Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

comedi: ni_atmio: avoid warning for unused device_ids[] table

When the driver is built-in, it produces a W=1 warning:

drivers/comedi/drivers/ni_atmio.c:209:35: error: 'device_ids' defined but not used [-Werror=unused-const-variable=]
209 | static const struct pnp_device_id device_ids[] = {

The actual probe() function has a different way of identifying
the hardware, so just mark this one as __maybe_unused so it
can be dropped when built-in.

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20250409122314.2848028-8-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arnd Bergmann and committed by
Greg Kroah-Hartman
a7924f4c c2c707bd

+1 -1
+1 -1
drivers/comedi/drivers/ni_atmio.c
··· 215 215 216 216 #include "ni_mio_common.c" 217 217 218 - static const struct pnp_device_id device_ids[] = { 218 + static const struct pnp_device_id __maybe_unused device_ids[] = { 219 219 {.id = "NIC1900", .driver_data = 0}, 220 220 {.id = "NIC2400", .driver_data = 0}, 221 221 {.id = "NIC2500", .driver_data = 0},