[PATCH v1] comedi: Drop unused assignments from pnp_device_id arrays
From: Uwe Kleine-König (The Capable Hub)
Date: Tue Jun 09 2026 - 11:08:06 EST
Explicitly assigning .driver_data in drivers that don't use this member
is silly and a bit irritating. Drop these. Also simplify the list
terminator entry to be just empty to match what most other device_id
tables do.
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>
---
drivers/comedi/drivers/c6xdigio.c | 6 +++---
drivers/comedi/drivers/ni_atmio.c | 14 +++++++-------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/comedi/drivers/c6xdigio.c b/drivers/comedi/drivers/c6xdigio.c
index b6563a48ada6..fd36f820979c 100644
--- a/drivers/comedi/drivers/c6xdigio.c
+++ b/drivers/comedi/drivers/c6xdigio.c
@@ -224,10 +224,10 @@ static void c6xdigio_init(struct comedi_device *dev)
static const struct pnp_device_id c6xdigio_pnp_tbl[] = {
/* Standard LPT Printer Port */
- {.id = "PNP0400", .driver_data = 0},
+ { .id = "PNP0400" },
/* ECP Printer Port */
- {.id = "PNP0401", .driver_data = 0},
- {}
+ { .id = "PNP0401" },
+ { }
};
static struct pnp_driver c6xdigio_pnp_driver = {
diff --git a/drivers/comedi/drivers/ni_atmio.c b/drivers/comedi/drivers/ni_atmio.c
index 7bc336333ace..537301eee9bf 100644
--- a/drivers/comedi/drivers/ni_atmio.c
+++ b/drivers/comedi/drivers/ni_atmio.c
@@ -215,13 +215,13 @@ static const int ni_irqpin[] = {
#include "ni_mio_common.c"
-static const struct pnp_device_id __maybe_unused device_ids[] = {
- {.id = "NIC1900", .driver_data = 0},
- {.id = "NIC2400", .driver_data = 0},
- {.id = "NIC2500", .driver_data = 0},
- {.id = "NIC2600", .driver_data = 0},
- {.id = "NIC2700", .driver_data = 0},
- {.id = ""}
+static const struct pnp_device_id device_ids[] = {
+ { .id = "NIC1900" },
+ { .id = "NIC2400" },
+ { .id = "NIC2500" },
+ { .id = "NIC2600" },
+ { .id = "NIC2700" },
+ { }
};
MODULE_DEVICE_TABLE(pnp, device_ids);
base-commit: a87737435cfa134f9cdcc696ba3080759d04cf72
--
2.47.3