[PATCH v1] floppy: Drop unused pnp driver data
From: Uwe Kleine-König (The Capable Hub)
Date: Wed Jun 10 2026 - 03:28:23 EST
The pnp_device_id array is only used for module data to support
auto-loading the floppy module. So the .driver_data member is unused and
this assignment can be dropped.
While touching that array, align the coding style to what is used most
for these.
This patch doesn't modify the compiled array, only its representation
in source form benefits. The former was confirmed with x86 and arm64
builds.
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
Hello,
I intend to change struct pnp_device_id and for that it's required that
.driver_data is not assigned using a list initializer. Instead of
converting it to a named initializer, drop the assignment as the value
is unused. So this is both a cleanup and a preparation for a later patch
series.
See
https://lore.kernel.org/all/cover.1779878004.git.u.kleine-koenig@xxxxxxxxxxxx/
for a more verbose description on the mentioned change to struct
pnp_device_id (though this is about platform_device_id, but the idea
here is the same).
Best regards
Uwe
drivers/block/floppy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 0509746f8aed..dca495be0683 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -5012,8 +5012,8 @@ MODULE_LICENSE("GPL");
/* This doesn't actually get used other than for module information */
static const struct pnp_device_id floppy_pnpids[] = {
- {"PNP0700", 0},
- {}
+ { .id = "PNP0700" },
+ { }
};
MODULE_DEVICE_TABLE(pnp, floppy_pnpids);
base-commit: 49e02880ec0a8c378e811bc9d85da188d7c6204c
--
2.47.3