[PATCH v1] media: Drop unused assignments from pnp_device_id array

From: Uwe Kleine-König (The Capable Hub)

Date: Tue Jun 09 2026 - 13:23:21 EST


Explicitly assigning .driver_data in drivers that don't use this member
is silly and a bit irritating. Drop it. Also simplify the list
terminator entry to be just empty to match what most other device_id
tables do.

While touching these arrays convert them to use named initializers,
empty list terminators and no comma after the terminator.

There is no changed semantic, not even a change in the compiled result.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
Hello,

I'm unsure if this patch should be split as drivers/media/radio has a
different MAINTAINER entry than drivers/media/rc, but as in practise the
patches to both dirs seem to go via Mauro's tree, I kept it together. If
you want it split, just tell me.

Best regards
Uwe

drivers/media/radio/radio-cadet.c | 4 ++--
drivers/media/radio/radio-gemtek.c | 4 ++--
drivers/media/rc/fintek-cir.c | 4 ++--
drivers/media/rc/nuvoton-cir.c | 6 +++---
drivers/media/rc/winbond-cir.c | 4 ++--
5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
index 5110754e1a31..53c1d1061cf4 100644
--- a/drivers/media/radio/radio-cadet.c
+++ b/drivers/media/radio/radio-cadet.c
@@ -527,8 +527,8 @@ static const struct v4l2_ctrl_ops cadet_ctrl_ops = {

static const struct pnp_device_id cadet_pnp_devices[] = {
/* ADS Cadet AM/FM Radio Card */
- {.id = "MSM0c24", .driver_data = 0},
- {.id = ""}
+ { .id = "MSM0c24" },
+ { }
};

MODULE_DEVICE_TABLE(pnp, cadet_pnp_devices);
diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c
index 3d1d0b46195b..7e4257e4b71d 100644
--- a/drivers/media/radio/radio-gemtek.c
+++ b/drivers/media/radio/radio-gemtek.c
@@ -284,8 +284,8 @@ static const int gemtek_ioports[] = { 0x20c, 0x30c, 0x24c, 0x34c, 0x248, 0x28c }
#ifdef CONFIG_PNP
static const struct pnp_device_id gemtek_pnp_devices[] = {
/* AOpen FX-3D/Pro Radio */
- {.id = "ADS7183", .driver_data = 0},
- {.id = ""}
+ { .id = "ADS7183" },
+ { }
};

MODULE_DEVICE_TABLE(pnp, gemtek_pnp_devices);
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index 5055dfc3f465..c196ee923ecd 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drivers/media/rc/fintek-cir.c
@@ -642,8 +642,8 @@ static void fintek_shutdown(struct pnp_dev *pdev)
}

static const struct pnp_device_id fintek_ids[] = {
- { "FIT0002", 0 }, /* CIR */
- { "", 0 },
+ { .id = "FIT0002" }, /* CIR */
+ { }
};

static struct pnp_driver fintek_driver = {
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 4e5a0c8dc9a0..918258dadd69 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/drivers/media/rc/nuvoton-cir.c
@@ -1092,9 +1092,9 @@ static void nvt_shutdown(struct pnp_dev *pdev)
}

static const struct pnp_device_id nvt_ids[] = {
- { "WEC0530", 0 }, /* CIR */
- { "NTN0530", 0 }, /* CIR for new chip's pnp id*/
- { "", 0 },
+ { .id = "WEC0530" }, /* CIR */
+ { .id = "NTN0530" }, /* CIR for new chip's pnp id*/
+ { }
};

static struct pnp_driver nvt_driver = {
diff --git a/drivers/media/rc/winbond-cir.c b/drivers/media/rc/winbond-cir.c
index 8e804661a621..1ae036f8a296 100644
--- a/drivers/media/rc/winbond-cir.c
+++ b/drivers/media/rc/winbond-cir.c
@@ -1179,8 +1179,8 @@ wbcir_remove(struct pnp_dev *device)
}

static const struct pnp_device_id wbcir_ids[] = {
- { "WEC1022", 0 },
- { "", 0 }
+ { .id = "WEC1022" },
+ { }
};
MODULE_DEVICE_TABLE(pnp, wbcir_ids);


base-commit: a87737435cfa134f9cdcc696ba3080759d04cf72
--
2.47.3