]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
NFC: nxp-nci: Constify acpi_device_id
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 29 Jul 2019 13:35:08 +0000 (16:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Jul 2019 15:56:26 +0000 (08:56 -0700)
The content of acpi_device_id is not supposed to change at runtime.
All functions working with acpi_device_id provided by <linux/acpi.h>
work with const acpi_device_id. So mark the non-const structs as const.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/nfc/nxp-nci/i2c.c

index bec9b1ea78e2678a7b7e12b8431f9e040124b9fa..4e71962dc55760adb088e1290fa2b4eb2bd00e9f 100644 (file)
@@ -330,7 +330,7 @@ static const struct of_device_id of_nxp_nci_i2c_match[] = {
 MODULE_DEVICE_TABLE(of, of_nxp_nci_i2c_match);
 
 #ifdef CONFIG_ACPI
-static struct acpi_device_id acpi_id[] = {
+static const struct acpi_device_id acpi_id[] = {
        { "NXP1001" },
        { "NXP7471" },
        { },