]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
staging: comedi: ni_atmio: make device_ids const
authorIan Abbott <abbotti@mev.co.uk>
Wed, 8 Mar 2017 18:02:05 +0000 (18:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Mar 2017 13:08:58 +0000 (14:08 +0100)
The `device_ids[]` passed to `MODULE_DEVICE_TABLE()` should be `const`.
When the "ni_atmio" driver is built-in, gcc warns about `device_ids`
being defined but ununsed.  Make it `const`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_atmio.c

index ffcf7afce684b335fef123cb48d80117b2d0b670..2d62a8c5733241738f68bd87a53247f2059dbdf8 100644 (file)
@@ -216,7 +216,7 @@ static const int ni_irqpin[] = {
 
 #include "ni_mio_common.c"
 
-static struct pnp_device_id device_ids[] = {
+static const struct pnp_device_id device_ids[] = {
        {.id = "NIC1900", .driver_data = 0},
        {.id = "NIC2400", .driver_data = 0},
        {.id = "NIC2500", .driver_data = 0},