summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2021-12-11 01:19:14 +0300
committerThomas Gleixner <tglx@linutronix.de>2021-12-17 00:16:40 +0300
commitdba27c7fa36f468e7eb29b216879f8c33bf0955d (patch)
tree78a34385ca9b797071a1dc7d70c2d1f7a142fd51 /drivers/base
parent20c6d424cfe641659c9a025db8a8608701b27246 (diff)
downloadlinux-dba27c7fa36f468e7eb29b216879f8c33bf0955d.tar.xz
platform-msi: Use msi_desc::msi_index
Use the common msi_index member and get rid of the pointless wrapper struct. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Nishanth Menon <nm@ti.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20211210221814.413638645@linutronix.de
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/platform-msi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/base/platform-msi.c b/drivers/base/platform-msi.c
index 1487906ad5e0..88bdc4b19916 100644
--- a/drivers/base/platform-msi.c
+++ b/drivers/base/platform-msi.c
@@ -40,7 +40,7 @@ static irq_hw_number_t platform_msi_calc_hwirq(struct msi_desc *desc)
{
u32 devid = desc->dev->msi.data->platform_data->devid;
- return (devid << (32 - DEV_ID_SHIFT)) | desc->platform.msi_index;
+ return (devid << (32 - DEV_ID_SHIFT)) | desc->msi_index;
}
static void platform_msi_set_desc(msi_alloc_info_t *arg, struct msi_desc *desc)
@@ -112,8 +112,8 @@ static void platform_msi_free_descs(struct device *dev, int base, int nvec)
struct msi_desc *desc, *tmp;
list_for_each_entry_safe(desc, tmp, dev_to_msi_list(dev), list) {
- if (desc->platform.msi_index >= base &&
- desc->platform.msi_index < (base + nvec)) {
+ if (desc->msi_index >= base &&
+ desc->msi_index < (base + nvec)) {
list_del(&desc->list);
free_msi_entry(desc);
}
@@ -129,7 +129,7 @@ static int platform_msi_alloc_descs_with_irq(struct device *dev, int virq,
if (!list_empty(dev_to_msi_list(dev))) {
desc = list_last_entry(dev_to_msi_list(dev),
struct msi_desc, list);
- base = desc->platform.msi_index + 1;
+ base = desc->msi_index + 1;
}
for (i = 0; i < nvec; i++) {
@@ -137,7 +137,7 @@ static int platform_msi_alloc_descs_with_irq(struct device *dev, int virq,
if (!desc)
break;
- desc->platform.msi_index = base + i;
+ desc->msi_index = base + i;
desc->irq = virq ? virq + i : 0;
list_add_tail(&desc->list, dev_to_msi_list(dev));