summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-09-14 05:59:30 -0400
committerJean Delvare <jdelvare@suse.de>2017-09-14 05:59:30 -0400
commit6faadbbb7f9da70ce484f98f72223c20125a1009 (patch)
treee6a72014b25bd4b68588772a5630f49ee5526ae7
parent46c1e79fee417f151547aa46fae04ab06cb666f4 (diff)
dmi: Mark all struct dmi_system_id instances const
... and __initconst if applicable. Based on similar work for an older kernel in the Grsecurity patch. [JD: fix toshiba-wmi build] [JD: add htcpen] [JD: move __initconst where checkscript wants it] Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jean Delvare <jdelvare@suse.de>
-rw-r--r--arch/x86/kernel/acpi/boot.c4
-rw-r--r--arch/x86/kernel/apm_32.c2
-rw-r--r--arch/x86/kernel/io_delay.c2
-rw-r--r--arch/x86/kernel/reboot.c2
-rw-r--r--arch/x86/pci/irq.c2
-rw-r--r--arch/x86/power/cpu.c2
-rw-r--r--drivers/acpi/acpi_video.c2
-rw-r--r--drivers/acpi/blacklist.c4
-rw-r--r--drivers/acpi/bus.c4
-rw-r--r--drivers/acpi/ec.c2
-rw-r--r--drivers/acpi/osi.c2
-rw-r--r--drivers/acpi/pci_slot.c2
-rw-r--r--drivers/acpi/processor_pdc.c2
-rw-r--r--drivers/acpi/sleep.c2
-rw-r--r--drivers/acpi/thermal.c2
-rw-r--r--drivers/char/sonypi.c2
-rw-r--r--drivers/cpufreq/powernow-k7.c2
-rw-r--r--drivers/firmware/google/gsmi.c2
-rw-r--r--drivers/firmware/google/memconsole-x86-legacy.c2
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c2
-rw-r--r--drivers/hwmon/acpi_power_meter.c2
-rw-r--r--drivers/hwmon/applesmc.c2
-rw-r--r--drivers/hwmon/dell-smm-hwmon.c4
-rw-r--r--drivers/input/touchscreen/htcpen.c2
-rw-r--r--drivers/leds/leds-clevo-mail.c2
-rw-r--r--drivers/leds/leds-ss4200.c2
-rw-r--r--drivers/mfd/kempld-core.c2
-rw-r--r--drivers/net/ethernet/marvell/skge.c2
-rw-r--r--drivers/net/ethernet/via/via-rhine.c2
-rw-r--r--drivers/pci/pcie/portdrv_pci.c2
-rw-r--r--drivers/pci/quirks.c2
-rw-r--r--drivers/platform/chrome/chromeos_laptop.c2
-rw-r--r--drivers/platform/chrome/chromeos_pstore.c2
-rw-r--r--drivers/platform/chrome/cros_ec_lpc.c2
-rw-r--r--drivers/platform/x86/compal-laptop.c2
-rw-r--r--drivers/platform/x86/hdaps.c2
-rw-r--r--drivers/platform/x86/ibm_rtl.c2
-rw-r--r--drivers/platform/x86/intel_oaktrail.c2
-rw-r--r--drivers/platform/x86/mlx-platform.c2
-rw-r--r--drivers/platform/x86/msi-laptop.c2
-rw-r--r--drivers/platform/x86/samsung-laptop.c2
-rw-r--r--drivers/platform/x86/samsung-q10.c2
-rw-r--r--drivers/platform/x86/sony-laptop.c2
-rw-r--r--drivers/platform/x86/toshiba-wmi.c2
-rw-r--r--drivers/pnp/pnpbios/core.c2
-rw-r--r--drivers/tty/serial/pch_uart.c2
-rw-r--r--drivers/video/backlight/kb3886_bl.c2
-rw-r--r--sound/soc/codecs/rt5645.c2
48 files changed, 52 insertions, 52 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index f8ae286c1502..079535e53e2a 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1373,7 +1373,7 @@ static void __init acpi_reduced_hw_init(void)
1373 * If your system is blacklisted here, but you find that acpi=force 1373 * If your system is blacklisted here, but you find that acpi=force
1374 * works for you, please contact linux-acpi@vger.kernel.org 1374 * works for you, please contact linux-acpi@vger.kernel.org
1375 */ 1375 */
1376static struct dmi_system_id __initdata acpi_dmi_table[] = { 1376static const struct dmi_system_id acpi_dmi_table[] __initconst = {
1377 /* 1377 /*
1378 * Boxes that need ACPI disabled 1378 * Boxes that need ACPI disabled
1379 */ 1379 */
@@ -1448,7 +1448,7 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
1448}; 1448};
1449 1449
1450/* second table for DMI checks that should run after early-quirks */ 1450/* second table for DMI checks that should run after early-quirks */
1451static struct dmi_system_id __initdata acpi_dmi_table_late[] = { 1451static const struct dmi_system_id acpi_dmi_table_late[] __initconst = {
1452 /* 1452 /*
1453 * HP laptops which use a DSDT reporting as HP/SB400/10000, 1453 * HP laptops which use a DSDT reporting as HP/SB400/10000,
1454 * which includes some code which overrides all temperature 1454 * which includes some code which overrides all temperature
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 446b0d3d4932..e4b0d92b3ae0 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -2043,7 +2043,7 @@ static int __init swab_apm_power_in_minutes(const struct dmi_system_id *d)
2043 return 0; 2043 return 0;
2044} 2044}
2045 2045
2046static struct dmi_system_id __initdata apm_dmi_table[] = { 2046static const struct dmi_system_id apm_dmi_table[] __initconst = {
2047 { 2047 {
2048 print_if_true, 2048 print_if_true,
2049 KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.", 2049 KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.",
diff --git a/arch/x86/kernel/io_delay.c b/arch/x86/kernel/io_delay.c
index 50c89e8a95f2..7ebcc4a74438 100644
--- a/arch/x86/kernel/io_delay.c
+++ b/arch/x86/kernel/io_delay.c
@@ -58,7 +58,7 @@ static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id)
58 * Quirk table for systems that misbehave (lock up, etc.) if port 58 * Quirk table for systems that misbehave (lock up, etc.) if port
59 * 0x80 is used: 59 * 0x80 is used:
60 */ 60 */
61static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = { 61static const struct dmi_system_id io_delay_0xed_port_dmi_table[] __initconst = {
62 { 62 {
63 .callback = dmi_io_delay_0xed_port, 63 .callback = dmi_io_delay_0xed_port,
64 .ident = "Compaq Presario V6000", 64 .ident = "Compaq Presario V6000",
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 54984b142641..54180fa6f66f 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -150,7 +150,7 @@ static int __init set_kbd_reboot(const struct dmi_system_id *d)
150/* 150/*
151 * This is a single dmi_table handling all reboot quirks. 151 * This is a single dmi_table handling all reboot quirks.
152 */ 152 */
153static struct dmi_system_id __initdata reboot_dmi_table[] = { 153static const struct dmi_system_id reboot_dmi_table[] __initconst = {
154 154
155 /* Acer */ 155 /* Acer */
156 { /* Handle reboot issue on Acer Aspire one */ 156 { /* Handle reboot issue on Acer Aspire one */
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c
index 9bd115484745..0f5f60b14f48 100644
--- a/arch/x86/pci/irq.c
+++ b/arch/x86/pci/irq.c
@@ -1092,7 +1092,7 @@ static int __init fix_acer_tm360_irqrouting(const struct dmi_system_id *d)
1092 return 0; 1092 return 0;
1093} 1093}
1094 1094
1095static struct dmi_system_id __initdata pciirq_dmi_table[] = { 1095static const struct dmi_system_id pciirq_dmi_table[] __initconst = {
1096 { 1096 {
1097 .callback = fix_broken_hp_bios_irq9, 1097 .callback = fix_broken_hp_bios_irq9,
1098 .ident = "HP Pavilion N5400 Series Laptop", 1098 .ident = "HP Pavilion N5400 Series Laptop",
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 4d68d59f457d..84fcfde53f8f 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -428,7 +428,7 @@ static int msr_initialize_bdw(const struct dmi_system_id *d)
428 return msr_init_context(bdw_msr_id, ARRAY_SIZE(bdw_msr_id)); 428 return msr_init_context(bdw_msr_id, ARRAY_SIZE(bdw_msr_id));
429} 429}
430 430
431static struct dmi_system_id msr_save_dmi_table[] = { 431static const struct dmi_system_id msr_save_dmi_table[] = {
432 { 432 {
433 .callback = msr_initialize_bdw, 433 .callback = msr_initialize_bdw,
434 .ident = "BROADWELL BDX_EP", 434 .ident = "BROADWELL BDX_EP",
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index e88fe3632dd6..0972ec0e2eb8 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -418,7 +418,7 @@ static int video_set_report_key_events(const struct dmi_system_id *id)
418 return 0; 418 return 0;
419} 419}
420 420
421static struct dmi_system_id video_dmi_table[] = { 421static const struct dmi_system_id video_dmi_table[] = {
422 /* 422 /*
423 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 423 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
424 */ 424 */
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c
index 037fd537bbf6..995c4d8922b1 100644
--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -30,7 +30,7 @@
30 30
31#include "internal.h" 31#include "internal.h"
32 32
33static struct dmi_system_id acpi_rev_dmi_table[] __initdata; 33static const struct dmi_system_id acpi_rev_dmi_table[] __initconst;
34 34
35/* 35/*
36 * POLICY: If *anything* doesn't work, put it on the blacklist. 36 * POLICY: If *anything* doesn't work, put it on the blacklist.
@@ -89,7 +89,7 @@ static int __init dmi_enable_rev_override(const struct dmi_system_id *d)
89} 89}
90#endif 90#endif
91 91
92static struct dmi_system_id acpi_rev_dmi_table[] __initdata = { 92static const struct dmi_system_id acpi_rev_dmi_table[] __initconst = {
93#ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE 93#ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE
94 /* 94 /*
95 * DELL XPS 13 (2015) switches sound between HDA and I2S 95 * DELL XPS 13 (2015) switches sound between HDA and I2S
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 59f2f96fdb7e..4d0979e02a28 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -67,7 +67,7 @@ static int set_copy_dsdt(const struct dmi_system_id *id)
67} 67}
68#endif 68#endif
69 69
70static struct dmi_system_id dsdt_dmi_table[] __initdata = { 70static const struct dmi_system_id dsdt_dmi_table[] __initconst = {
71 /* 71 /*
72 * Invoke DSDT corruption work-around on all Toshiba Satellite. 72 * Invoke DSDT corruption work-around on all Toshiba Satellite.
73 * https://bugzilla.kernel.org/show_bug.cgi?id=14679 73 * https://bugzilla.kernel.org/show_bug.cgi?id=14679
@@ -83,7 +83,7 @@ static struct dmi_system_id dsdt_dmi_table[] __initdata = {
83 {} 83 {}
84}; 84};
85#else 85#else
86static struct dmi_system_id dsdt_dmi_table[] __initdata = { 86static const struct dmi_system_id dsdt_dmi_table[] __initconst = {
87 {} 87 {}
88}; 88};
89#endif 89#endif
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index fdfae6f3c0b1..236b14324780 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1809,7 +1809,7 @@ static int ec_honor_ecdt_gpe(const struct dmi_system_id *id)
1809 return 0; 1809 return 0;
1810} 1810}
1811 1811
1812static struct dmi_system_id ec_dmi_table[] __initdata = { 1812static const struct dmi_system_id ec_dmi_table[] __initconst = {
1813 { 1813 {
1814 ec_correct_ecdt, "MSI MS-171F", { 1814 ec_correct_ecdt, "MSI MS-171F", {
1815 DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star"), 1815 DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star"),
diff --git a/drivers/acpi/osi.c b/drivers/acpi/osi.c
index 19cdd8a783a9..76998a51bf99 100644
--- a/drivers/acpi/osi.c
+++ b/drivers/acpi/osi.c
@@ -312,7 +312,7 @@ static int __init dmi_disable_osi_win8(const struct dmi_system_id *d)
312 * Note that _OSI("Linux")/_OSI("Darwin") determined here can be overridden 312 * Note that _OSI("Linux")/_OSI("Darwin") determined here can be overridden
313 * by acpi_osi=!Linux/acpi_osi=!Darwin command line options. 313 * by acpi_osi=!Linux/acpi_osi=!Darwin command line options.
314 */ 314 */
315static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { 315static const struct dmi_system_id acpi_osi_dmi_table[] __initconst = {
316 { 316 {
317 .callback = dmi_disable_osi_vista, 317 .callback = dmi_disable_osi_vista,
318 .ident = "Fujitsu Siemens", 318 .ident = "Fujitsu Siemens",
diff --git a/drivers/acpi/pci_slot.c b/drivers/acpi/pci_slot.c
index f62c68e24317..e90b61f7d2db 100644
--- a/drivers/acpi/pci_slot.c
+++ b/drivers/acpi/pci_slot.c
@@ -174,7 +174,7 @@ static int do_sta_before_sun(const struct dmi_system_id *d)
174 return 0; 174 return 0;
175} 175}
176 176
177static struct dmi_system_id acpi_pci_slot_dmi_table[] __initdata = { 177static const struct dmi_system_id acpi_pci_slot_dmi_table[] __initconst = {
178 /* 178 /*
179 * Fujitsu Primequest machines will return 1023 to indicate an 179 * Fujitsu Primequest machines will return 1023 to indicate an
180 * error if the _SUN method is evaluated on SxFy objects that 180 * error if the _SUN method is evaluated on SxFy objects that
diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c
index 7cfbda4d7c51..74f738cb6073 100644
--- a/drivers/acpi/processor_pdc.c
+++ b/drivers/acpi/processor_pdc.c
@@ -173,7 +173,7 @@ static int __init set_no_mwait(const struct dmi_system_id *id)
173 return 0; 173 return 0;
174} 174}
175 175
176static struct dmi_system_id processor_idle_dmi_table[] __initdata = { 176static const struct dmi_system_id processor_idle_dmi_table[] __initconst = {
177 { 177 {
178 set_no_mwait, "Extensa 5220", { 178 set_no_mwait, "Extensa 5220", {
179 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"), 179 DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 9fdd014759f8..6804ddab3052 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -160,7 +160,7 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
160 return 0; 160 return 0;
161} 161}
162 162
163static struct dmi_system_id acpisleep_dmi_table[] __initdata = { 163static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
164 { 164 {
165 .callback = init_old_suspend_ordering, 165 .callback = init_old_suspend_ordering,
166 .ident = "Abit KN9 (nForce4 variant)", 166 .ident = "Abit KN9 (nForce4 variant)",
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 1d0417b87cb7..551b71a24b85 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -1209,7 +1209,7 @@ static int thermal_psv(const struct dmi_system_id *d) {
1209 return 0; 1209 return 0;
1210} 1210}
1211 1211
1212static struct dmi_system_id thermal_dmi_table[] __initdata = { 1212static const struct dmi_system_id thermal_dmi_table[] __initconst = {
1213 /* 1213 /*
1214 * Award BIOS on this AOpen makes thermal control almost worthless. 1214 * Award BIOS on this AOpen makes thermal control almost worthless.
1215 * http://bugzilla.kernel.org/show_bug.cgi?id=8842 1215 * http://bugzilla.kernel.org/show_bug.cgi?id=8842
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index f4f866ee54bc..d3a979e25724 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -1491,7 +1491,7 @@ static struct platform_driver sonypi_driver = {
1491 1491
1492static struct platform_device *sonypi_platform_device; 1492static struct platform_device *sonypi_platform_device;
1493 1493
1494static struct dmi_system_id __initdata sonypi_dmi_table[] = { 1494static const struct dmi_system_id sonypi_dmi_table[] __initconst = {
1495 { 1495 {
1496 .ident = "Sony Vaio", 1496 .ident = "Sony Vaio",
1497 .matches = { 1497 .matches = {
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index 9f013ed42977..80ac313e6c59 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -578,7 +578,7 @@ static int acer_cpufreq_pst(const struct dmi_system_id *d)
578 * A BIOS update is all that can save them. 578 * A BIOS update is all that can save them.
579 * Mention this, and disable cpufreq. 579 * Mention this, and disable cpufreq.
580 */ 580 */
581static struct dmi_system_id powernow_dmi_table[] = { 581static const struct dmi_system_id powernow_dmi_table[] = {
582 { 582 {
583 .callback = acer_cpufreq_pst, 583 .callback = acer_cpufreq_pst,
584 .ident = "Acer Aspire", 584 .ident = "Acer Aspire",
diff --git a/drivers/firmware/google/gsmi.c b/drivers/firmware/google/gsmi.c
index c46387160976..c8f169bf2e27 100644
--- a/drivers/firmware/google/gsmi.c
+++ b/drivers/firmware/google/gsmi.c
@@ -709,7 +709,7 @@ static u32 __init hash_oem_table_id(char s[8])
709 return local_hash_64(input, 32); 709 return local_hash_64(input, 32);
710} 710}
711 711
712static struct dmi_system_id gsmi_dmi_table[] __initdata = { 712static const struct dmi_system_id gsmi_dmi_table[] __initconst = {
713 { 713 {
714 .ident = "Google Board", 714 .ident = "Google Board",
715 .matches = { 715 .matches = {
diff --git a/drivers/firmware/google/memconsole-x86-legacy.c b/drivers/firmware/google/memconsole-x86-legacy.c
index 8c1bf6dbdaa6..19bcbd10855b 100644
--- a/drivers/firmware/google/memconsole-x86-legacy.c
+++ b/drivers/firmware/google/memconsole-x86-legacy.c
@@ -126,7 +126,7 @@ static bool memconsole_ebda_init(void)
126 return false; 126 return false;
127} 127}
128 128
129static struct dmi_system_id memconsole_dmi_table[] __initdata = { 129static const struct dmi_system_id memconsole_dmi_table[] __initconst = {
130 { 130 {
131 .ident = "Google Board", 131 .ident = "Google Board",
132 .matches = { 132 .matches = {
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
index 4a57defc99b3..1399d923d446 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
@@ -171,7 +171,7 @@ nvkm_gpio_fini(struct nvkm_subdev *subdev, bool suspend)
171 return 0; 171 return 0;
172} 172}
173 173
174static struct dmi_system_id gpio_reset_ids[] = { 174static const struct dmi_system_id gpio_reset_ids[] = {
175 { 175 {
176 .ident = "Apple Macbook 10,1", 176 .ident = "Apple Macbook 10,1",
177 .matches = { 177 .matches = {
diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c
index 579bdf93be43..14a94d90c028 100644
--- a/drivers/hwmon/acpi_power_meter.c
+++ b/drivers/hwmon/acpi_power_meter.c
@@ -973,7 +973,7 @@ static int __init enable_cap_knobs(const struct dmi_system_id *d)
973 return 0; 973 return 0;
974} 974}
975 975
976static struct dmi_system_id __initdata pm_dmi_table[] = { 976static const struct dmi_system_id pm_dmi_table[] __initconst = {
977 { 977 {
978 enable_cap_knobs, "IBM Active Energy Manager", 978 enable_cap_knobs, "IBM Active Energy Manager",
979 { 979 {
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c
index 76c34f4fde13..5c677ba44014 100644
--- a/drivers/hwmon/applesmc.c
+++ b/drivers/hwmon/applesmc.c
@@ -1247,7 +1247,7 @@ static int applesmc_dmi_match(const struct dmi_system_id *id)
1247 * Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1". 1247 * Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
1248 * So we need to put "Apple MacBook Pro" before "Apple MacBook". 1248 * So we need to put "Apple MacBook Pro" before "Apple MacBook".
1249 */ 1249 */
1250static __initdata struct dmi_system_id applesmc_whitelist[] = { 1250static const struct dmi_system_id applesmc_whitelist[] __initconst = {
1251 { applesmc_dmi_match, "Apple MacBook Air", { 1251 { applesmc_dmi_match, "Apple MacBook Air", {
1252 DMI_MATCH(DMI_BOARD_VENDOR, "Apple"), 1252 DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
1253 DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir") }, 1253 DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir") },
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 3189246302a6..c7c9e95e58a8 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -890,7 +890,7 @@ static const struct i8k_config_data i8k_config_data[] = {
890 }, 890 },
891}; 891};
892 892
893static struct dmi_system_id i8k_dmi_table[] __initdata = { 893static const struct dmi_system_id i8k_dmi_table[] __initconst = {
894 { 894 {
895 .ident = "Dell Inspiron", 895 .ident = "Dell Inspiron",
896 .matches = { 896 .matches = {
@@ -1013,7 +1013,7 @@ MODULE_DEVICE_TABLE(dmi, i8k_dmi_table);
1013 * of affected Dell machines for which we disallow I8K_SMM_GET_FAN_TYPE call. 1013 * of affected Dell machines for which we disallow I8K_SMM_GET_FAN_TYPE call.
1014 * See bug: https://bugzilla.kernel.org/show_bug.cgi?id=100121 1014 * See bug: https://bugzilla.kernel.org/show_bug.cgi?id=100121
1015 */ 1015 */
1016static struct dmi_system_id i8k_blacklist_fan_type_dmi_table[] __initdata = { 1016static const struct dmi_system_id i8k_blacklist_fan_type_dmi_table[] __initconst = {
1017 { 1017 {
1018 .ident = "Dell Studio XPS 8000", 1018 .ident = "Dell Studio XPS 8000",
1019 .matches = { 1019 .matches = {
diff --git a/drivers/input/touchscreen/htcpen.c b/drivers/input/touchscreen/htcpen.c
index 92e2243fb77d..8fd909285877 100644
--- a/drivers/input/touchscreen/htcpen.c
+++ b/drivers/input/touchscreen/htcpen.c
@@ -219,7 +219,7 @@ static struct isa_driver htcpen_isa_driver = {
219 } 219 }
220}; 220};
221 221
222static struct dmi_system_id htcshift_dmi_table[] __initdata = { 222static const struct dmi_system_id htcshift_dmi_table[] __initconst = {
223 { 223 {
224 .ident = "Shift", 224 .ident = "Shift",
225 .matches = { 225 .matches = {
diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index 0f9ed1ea0e89..492789f56896 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -40,7 +40,7 @@ static int __init clevo_mail_led_dmi_callback(const struct dmi_system_id *id)
40 * detected as working, but in reality it is not) as low as 40 * detected as working, but in reality it is not) as low as
41 * possible. 41 * possible.
42 */ 42 */
43static struct dmi_system_id clevo_mail_led_dmi_table[] __initdata = { 43static const struct dmi_system_id clevo_mail_led_dmi_table[] __initconst = {
44 { 44 {
45 .callback = clevo_mail_led_dmi_callback, 45 .callback = clevo_mail_led_dmi_callback,
46 .ident = "Clevo D410J", 46 .ident = "Clevo D410J",
diff --git a/drivers/leds/leds-ss4200.c b/drivers/leds/leds-ss4200.c
index 732eb86bc1a5..a9db8674cd02 100644
--- a/drivers/leds/leds-ss4200.c
+++ b/drivers/leds/leds-ss4200.c
@@ -91,7 +91,7 @@ MODULE_PARM_DESC(nodetect, "Skip DMI-based hardware detection");
91 * detected as working, but in reality it is not) as low as 91 * detected as working, but in reality it is not) as low as
92 * possible. 92 * possible.
93 */ 93 */
94static struct dmi_system_id nas_led_whitelist[] __initdata = { 94static const struct dmi_system_id nas_led_whitelist[] __initconst = {
95 { 95 {
96 .callback = ss4200_led_dmi_callback, 96 .callback = ss4200_led_dmi_callback,
97 .ident = "Intel SS4200-E", 97 .ident = "Intel SS4200-E",
diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
index 895f655780a7..55d824b3a808 100644
--- a/drivers/mfd/kempld-core.c
+++ b/drivers/mfd/kempld-core.c
@@ -494,7 +494,7 @@ static struct platform_driver kempld_driver = {
494 .remove = kempld_remove, 494 .remove = kempld_remove,
495}; 495};
496 496
497static struct dmi_system_id kempld_dmi_table[] __initdata = { 497static const struct dmi_system_id kempld_dmi_table[] __initconst = {
498 { 498 {
499 .ident = "BBD6", 499 .ident = "BBD6",
500 .matches = { 500 .matches = {
diff --git a/drivers/net/ethernet/marvell/skge.c b/drivers/net/ethernet/marvell/skge.c
index 8a835e82256a..eef35bf3e849 100644
--- a/drivers/net/ethernet/marvell/skge.c
+++ b/drivers/net/ethernet/marvell/skge.c
@@ -4193,7 +4193,7 @@ static struct pci_driver skge_driver = {
4193 .driver.pm = SKGE_PM_OPS, 4193 .driver.pm = SKGE_PM_OPS,
4194}; 4194};
4195 4195
4196static struct dmi_system_id skge_32bit_dma_boards[] = { 4196static const struct dmi_system_id skge_32bit_dma_boards[] = {
4197 { 4197 {
4198 .ident = "Gigabyte nForce boards", 4198 .ident = "Gigabyte nForce boards",
4199 .matches = { 4199 .matches = {
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index acd29d60174a..83e6f76eb965 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -2598,7 +2598,7 @@ static struct platform_driver rhine_driver_platform = {
2598 } 2598 }
2599}; 2599};
2600 2600
2601static struct dmi_system_id rhine_dmi_table[] __initdata = { 2601static const struct dmi_system_id rhine_dmi_table[] __initconst = {
2602 { 2602 {
2603 .ident = "EPIA-M", 2603 .ident = "EPIA-M",
2604 .matches = { 2604 .matches = {
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c
index be635f017756..083276e03c38 100644
--- a/drivers/pci/pcie/portdrv_pci.c
+++ b/drivers/pci/pcie/portdrv_pci.c
@@ -260,7 +260,7 @@ static int __init dmi_pcie_pme_disable_msi(const struct dmi_system_id *d)
260 return 0; 260 return 0;
261} 261}
262 262
263static struct dmi_system_id __initdata pcie_portdrv_dmi_table[] = { 263static const struct dmi_system_id pcie_portdrv_dmi_table[] __initconst = {
264 /* 264 /*
265 * Boxes that should not use MSI for PCIe PME signaling. 265 * Boxes that should not use MSI for PCIe PME signaling.
266 */ 266 */
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index a2afb44fad10..a4d33619a7bb 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1707,7 +1707,7 @@ static int dmi_disable_ioapicreroute(const struct dmi_system_id *d)
1707 return 0; 1707 return 0;
1708} 1708}
1709 1709
1710static struct dmi_system_id boot_interrupt_dmi_table[] = { 1710static const struct dmi_system_id boot_interrupt_dmi_table[] = {
1711 /* 1711 /*
1712 * Systems to exclude from boot interrupt reroute quirks 1712 * Systems to exclude from boot interrupt reroute quirks
1713 */ 1713 */
diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
index e8a44a9bc916..d8599736a41a 100644
--- a/drivers/platform/chrome/chromeos_laptop.c
+++ b/drivers/platform/chrome/chromeos_laptop.c
@@ -518,7 +518,7 @@ static struct chromeos_laptop cr48 = {
518 .callback = chromeos_laptop_dmi_matched, \ 518 .callback = chromeos_laptop_dmi_matched, \
519 .driver_data = (void *)&board_ 519 .driver_data = (void *)&board_
520 520
521static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = { 521static const struct dmi_system_id chromeos_laptop_dmi_table[] __initconst = {
522 { 522 {
523 .ident = "Samsung Series 5 550", 523 .ident = "Samsung Series 5 550",
524 .matches = { 524 .matches = {
diff --git a/drivers/platform/chrome/chromeos_pstore.c b/drivers/platform/chrome/chromeos_pstore.c
index 308a853ac4f1..b0693fdec8c6 100644
--- a/drivers/platform/chrome/chromeos_pstore.c
+++ b/drivers/platform/chrome/chromeos_pstore.c
@@ -14,7 +14,7 @@
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/pstore_ram.h> 15#include <linux/pstore_ram.h>
16 16
17static struct dmi_system_id chromeos_pstore_dmi_table[] __initdata = { 17static const struct dmi_system_id chromeos_pstore_dmi_table[] __initconst = {
18 { 18 {
19 /* 19 /*
20 * Today all Chromebooks/boxes ship with Google_* as version and 20 * Today all Chromebooks/boxes ship with Google_* as version and
diff --git a/drivers/platform/chrome/cros_ec_lpc.c b/drivers/platform/chrome/cros_ec_lpc.c
index 2b6436d1b6a4..1baf720faf69 100644
--- a/drivers/platform/chrome/cros_ec_lpc.c
+++ b/drivers/platform/chrome/cros_ec_lpc.c
@@ -329,7 +329,7 @@ static const struct acpi_device_id cros_ec_lpc_acpi_device_ids[] = {
329}; 329};
330MODULE_DEVICE_TABLE(acpi, cros_ec_lpc_acpi_device_ids); 330MODULE_DEVICE_TABLE(acpi, cros_ec_lpc_acpi_device_ids);
331 331
332static struct dmi_system_id cros_ec_lpc_dmi_table[] __initdata = { 332static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = {
333 { 333 {
334 /* 334 /*
335 * Today all Chromebooks/boxes ship with Google_* as version and 335 * Today all Chromebooks/boxes ship with Google_* as version and
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index a8e4a539e704..6bcb750e1865 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -805,7 +805,7 @@ static int dmi_check_cb_extra(const struct dmi_system_id *id)
805 return 1; 805 return 1;
806} 806}
807 807
808static struct dmi_system_id __initdata compal_dmi_table[] = { 808static const struct dmi_system_id compal_dmi_table[] __initconst = {
809 { 809 {
810 .ident = "FL90/IFL90", 810 .ident = "FL90/IFL90",
811 .matches = { 811 .matches = {
diff --git a/drivers/platform/x86/hdaps.c b/drivers/platform/x86/hdaps.c
index 458e6c948c11..c26baf77938e 100644
--- a/drivers/platform/x86/hdaps.c
+++ b/drivers/platform/x86/hdaps.c
@@ -514,7 +514,7 @@ static int __init hdaps_dmi_match_invert(const struct dmi_system_id *id)
514 "ThinkPad T42p", so the order of the entries matters. 514 "ThinkPad T42p", so the order of the entries matters.
515 If your ThinkPad is not recognized, please update to latest 515 If your ThinkPad is not recognized, please update to latest
516 BIOS. This is especially the case for some R52 ThinkPads. */ 516 BIOS. This is especially the case for some R52 ThinkPads. */
517static struct dmi_system_id __initdata hdaps_whitelist[] = { 517static const struct dmi_system_id hdaps_whitelist[] __initconst = {
518 HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad R50p", HDAPS_BOTH_AXES), 518 HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad R50p", HDAPS_BOTH_AXES),
519 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R50"), 519 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R50"),
520 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"), 520 HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"),
diff --git a/drivers/platform/x86/ibm_rtl.c b/drivers/platform/x86/ibm_rtl.c
index 610ac8391caa..18d55cee5bcd 100644
--- a/drivers/platform/x86/ibm_rtl.c
+++ b/drivers/platform/x86/ibm_rtl.c
@@ -227,7 +227,7 @@ static void rtl_teardown_sysfs(void) {
227} 227}
228 228
229 229
230static struct dmi_system_id __initdata ibm_rtl_dmi_table[] = { 230static const struct dmi_system_id ibm_rtl_dmi_table[] __initconst = {
231 { \ 231 { \
232 .matches = { \ 232 .matches = { \
233 DMI_MATCH(DMI_SYS_VENDOR, "IBM"), \ 233 DMI_MATCH(DMI_SYS_VENDOR, "IBM"), \
diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel_oaktrail.c
index 6aa33c4a809f..5747f63c8d9f 100644
--- a/drivers/platform/x86/intel_oaktrail.c
+++ b/drivers/platform/x86/intel_oaktrail.c
@@ -299,7 +299,7 @@ static int dmi_check_cb(const struct dmi_system_id *id)
299 return 0; 299 return 0;
300} 300}
301 301
302static struct dmi_system_id __initdata oaktrail_dmi_table[] = { 302static const struct dmi_system_id oaktrail_dmi_table[] __initconst = {
303 { 303 {
304 .ident = "OakTrail platform", 304 .ident = "OakTrail platform",
305 .matches = { 305 .matches = {
diff --git a/drivers/platform/x86/mlx-platform.c b/drivers/platform/x86/mlx-platform.c
index 8f98c211b440..4f3de2a8c4df 100644
--- a/drivers/platform/x86/mlx-platform.c
+++ b/drivers/platform/x86/mlx-platform.c
@@ -247,7 +247,7 @@ static int __init mlxplat_dmi_msn21xx_matched(const struct dmi_system_id *dmi)
247 return 1; 247 return 1;
248}; 248};
249 249
250static struct dmi_system_id mlxplat_dmi_table[] __initdata = { 250static const struct dmi_system_id mlxplat_dmi_table[] __initconst = {
251 { 251 {
252 .callback = mlxplat_dmi_default_matched, 252 .callback = mlxplat_dmi_default_matched,
253 .matches = { 253 .matches = {
diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c
index 61b9014d2610..d5bfcc602090 100644
--- a/drivers/platform/x86/msi-laptop.c
+++ b/drivers/platform/x86/msi-laptop.c
@@ -605,7 +605,7 @@ static int dmi_check_cb(const struct dmi_system_id *dmi)
605 return 1; 605 return 1;
606} 606}
607 607
608static struct dmi_system_id __initdata msi_dmi_table[] = { 608static const struct dmi_system_id msi_dmi_table[] __initconst = {
609 { 609 {
610 .ident = "MSI S270", 610 .ident = "MSI S270",
611 .matches = { 611 .matches = {
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index 0c703feaeb88..d3cb26f6df73 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -1567,7 +1567,7 @@ static int __init samsung_dmi_matched(const struct dmi_system_id *d)
1567 return 0; 1567 return 0;
1568} 1568}
1569 1569
1570static struct dmi_system_id __initdata samsung_dmi_table[] = { 1570static const struct dmi_system_id samsung_dmi_table[] __initconst = {
1571 { 1571 {
1572 .matches = { 1572 .matches = {
1573 DMI_MATCH(DMI_SYS_VENDOR, 1573 DMI_MATCH(DMI_SYS_VENDOR,
diff --git a/drivers/platform/x86/samsung-q10.c b/drivers/platform/x86/samsung-q10.c
index e6aac725a0af..a2fb7fbc3273 100644
--- a/drivers/platform/x86/samsung-q10.c
+++ b/drivers/platform/x86/samsung-q10.c
@@ -95,7 +95,7 @@ static int __init dmi_check_callback(const struct dmi_system_id *id)
95 return 1; 95 return 1;
96} 96}
97 97
98static struct dmi_system_id __initdata samsungq10_dmi_table[] = { 98static const struct dmi_system_id samsungq10_dmi_table[] __initconst = {
99 { 99 {
100 .ident = "Samsung Q10", 100 .ident = "Samsung Q10",
101 .matches = { 101 .matches = {
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c
index bfae79534f44..a16cea2be9c3 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -4880,7 +4880,7 @@ static struct acpi_driver sony_pic_driver = {
4880 .drv.pm = &sony_pic_pm, 4880 .drv.pm = &sony_pic_pm,
4881}; 4881};
4882 4882
4883static struct dmi_system_id __initdata sonypi_dmi_table[] = { 4883static const struct dmi_system_id sonypi_dmi_table[] __initconst = {
4884 { 4884 {
4885 .ident = "Sony Vaio", 4885 .ident = "Sony Vaio",
4886 .matches = { 4886 .matches = {
diff --git a/drivers/platform/x86/toshiba-wmi.c b/drivers/platform/x86/toshiba-wmi.c
index 440528676170..03d7620cd6d7 100644
--- a/drivers/platform/x86/toshiba-wmi.c
+++ b/drivers/platform/x86/toshiba-wmi.c
@@ -64,7 +64,7 @@ static void toshiba_wmi_notify(u32 value, void *context)
64 kfree(response.pointer); 64 kfree(response.pointer);
65} 65}
66 66
67static struct dmi_system_id toshiba_wmi_dmi_table[] __initdata = { 67static const struct dmi_system_id toshiba_wmi_dmi_table[] __initconst = {
68 { 68 {
69 .ident = "Toshiba laptop", 69 .ident = "Toshiba laptop",
70 .matches = { 70 .matches = {
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 0ced908e7aa8..e681140b85d8 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -495,7 +495,7 @@ static int __init exploding_pnp_bios(const struct dmi_system_id *d)
495 return 0; 495 return 0;
496} 496}
497 497
498static struct dmi_system_id pnpbios_dmi_table[] __initdata = { 498static const struct dmi_system_id pnpbios_dmi_table[] __initconst = {
499 { /* PnPBIOS GPF on boot */ 499 { /* PnPBIOS GPF on boot */
500 .callback = exploding_pnp_bios, 500 .callback = exploding_pnp_bios,
501 .ident = "Higraded P14H", 501 .ident = "Higraded P14H",
diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index ae8cfc81ffc5..d9123f995705 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -371,7 +371,7 @@ static const struct file_operations port_regs_ops = {
371}; 371};
372#endif /* CONFIG_DEBUG_FS */ 372#endif /* CONFIG_DEBUG_FS */
373 373
374static struct dmi_system_id pch_uart_dmi_table[] = { 374static const struct dmi_system_id pch_uart_dmi_table[] = {
375 { 375 {
376 .ident = "CM-iTC", 376 .ident = "CM-iTC",
377 { 377 {
diff --git a/drivers/video/backlight/kb3886_bl.c b/drivers/video/backlight/kb3886_bl.c
index 84a110a719cb..96312c3afc07 100644
--- a/drivers/video/backlight/kb3886_bl.c
+++ b/drivers/video/backlight/kb3886_bl.c
@@ -78,7 +78,7 @@ static struct kb3886bl_machinfo *bl_machinfo;
78static unsigned long kb3886bl_flags; 78static unsigned long kb3886bl_flags;
79#define KB3886BL_SUSPENDED 0x01 79#define KB3886BL_SUSPENDED 0x01
80 80
81static struct dmi_system_id kb3886bl_device_table[] __initdata = { 81static const struct dmi_system_id kb3886bl_device_table[] __initconst = {
82 { 82 {
83 .ident = "Sahara Touch-iT", 83 .ident = "Sahara Touch-iT",
84 .matches = { 84 .matches = {
diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 6a7778a44853..a98647ac497c 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -3600,7 +3600,7 @@ static const struct rt5645_platform_data buddy_platform_data = {
3600 .level_trigger_irq = true, 3600 .level_trigger_irq = true,
3601}; 3601};
3602 3602
3603static struct dmi_system_id dmi_platform_intel_broadwell[] = { 3603static const struct dmi_system_id dmi_platform_intel_broadwell[] = {
3604 { 3604 {
3605 .ident = "Chrome Buddy", 3605 .ident = "Chrome Buddy",
3606 .matches = { 3606 .matches = {