浏览代码

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>
Christoph Hellwig 8 年之前
父节点
当前提交
6faadbbb7f
共有 48 个文件被更改,包括 52 次插入52 次删除
  1. 2 2
      arch/x86/kernel/acpi/boot.c
  2. 1 1
      arch/x86/kernel/apm_32.c
  3. 1 1
      arch/x86/kernel/io_delay.c
  4. 1 1
      arch/x86/kernel/reboot.c
  5. 1 1
      arch/x86/pci/irq.c
  6. 1 1
      arch/x86/power/cpu.c
  7. 1 1
      drivers/acpi/acpi_video.c
  8. 2 2
      drivers/acpi/blacklist.c
  9. 2 2
      drivers/acpi/bus.c
  10. 1 1
      drivers/acpi/ec.c
  11. 1 1
      drivers/acpi/osi.c
  12. 1 1
      drivers/acpi/pci_slot.c
  13. 1 1
      drivers/acpi/processor_pdc.c
  14. 1 1
      drivers/acpi/sleep.c
  15. 1 1
      drivers/acpi/thermal.c
  16. 1 1
      drivers/char/sonypi.c
  17. 1 1
      drivers/cpufreq/powernow-k7.c
  18. 1 1
      drivers/firmware/google/gsmi.c
  19. 1 1
      drivers/firmware/google/memconsole-x86-legacy.c
  20. 1 1
      drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c
  21. 1 1
      drivers/hwmon/acpi_power_meter.c
  22. 1 1
      drivers/hwmon/applesmc.c
  23. 2 2
      drivers/hwmon/dell-smm-hwmon.c
  24. 1 1
      drivers/input/touchscreen/htcpen.c
  25. 1 1
      drivers/leds/leds-clevo-mail.c
  26. 1 1
      drivers/leds/leds-ss4200.c
  27. 1 1
      drivers/mfd/kempld-core.c
  28. 1 1
      drivers/net/ethernet/marvell/skge.c
  29. 1 1
      drivers/net/ethernet/via/via-rhine.c
  30. 1 1
      drivers/pci/pcie/portdrv_pci.c
  31. 1 1
      drivers/pci/quirks.c
  32. 1 1
      drivers/platform/chrome/chromeos_laptop.c
  33. 1 1
      drivers/platform/chrome/chromeos_pstore.c
  34. 1 1
      drivers/platform/chrome/cros_ec_lpc.c
  35. 1 1
      drivers/platform/x86/compal-laptop.c
  36. 1 1
      drivers/platform/x86/hdaps.c
  37. 1 1
      drivers/platform/x86/ibm_rtl.c
  38. 1 1
      drivers/platform/x86/intel_oaktrail.c
  39. 1 1
      drivers/platform/x86/mlx-platform.c
  40. 1 1
      drivers/platform/x86/msi-laptop.c
  41. 1 1
      drivers/platform/x86/samsung-laptop.c
  42. 1 1
      drivers/platform/x86/samsung-q10.c
  43. 1 1
      drivers/platform/x86/sony-laptop.c
  44. 1 1
      drivers/platform/x86/toshiba-wmi.c
  45. 1 1
      drivers/pnp/pnpbios/core.c
  46. 1 1
      drivers/tty/serial/pch_uart.c
  47. 1 1
      drivers/video/backlight/kb3886_bl.c
  48. 1 1
      sound/soc/codecs/rt5645.c

+ 2 - 2
arch/x86/kernel/acpi/boot.c

@@ -1373,7 +1373,7 @@ static void __init acpi_reduced_hw_init(void)
  * If your system is blacklisted here, but you find that acpi=force
  * If your system is blacklisted here, but you find that acpi=force
  * works for you, please contact linux-acpi@vger.kernel.org
  * works for you, please contact linux-acpi@vger.kernel.org
  */
  */
-static struct dmi_system_id __initdata acpi_dmi_table[] = {
+static const struct dmi_system_id acpi_dmi_table[] __initconst = {
 	/*
 	/*
 	 * Boxes that need ACPI disabled
 	 * Boxes that need ACPI disabled
 	 */
 	 */
@@ -1448,7 +1448,7 @@ static struct dmi_system_id __initdata acpi_dmi_table[] = {
 };
 };
 
 
 /* second table for DMI checks that should run after early-quirks */
 /* second table for DMI checks that should run after early-quirks */
-static struct dmi_system_id __initdata acpi_dmi_table_late[] = {
+static const struct dmi_system_id acpi_dmi_table_late[] __initconst = {
 	/*
 	/*
 	 * HP laptops which use a DSDT reporting as HP/SB400/10000,
 	 * HP laptops which use a DSDT reporting as HP/SB400/10000,
 	 * which includes some code which overrides all temperature
 	 * which includes some code which overrides all temperature

+ 1 - 1
arch/x86/kernel/apm_32.c

@@ -2043,7 +2043,7 @@ static int __init swab_apm_power_in_minutes(const struct dmi_system_id *d)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id __initdata apm_dmi_table[] = {
+static const struct dmi_system_id apm_dmi_table[] __initconst = {
 	{
 	{
 		print_if_true,
 		print_if_true,
 		KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.",
 		KERN_WARNING "IBM T23 - BIOS 1.03b+ and controller firmware 1.02+ may be needed for Linux APM.",

+ 1 - 1
arch/x86/kernel/io_delay.c

@@ -58,7 +58,7 @@ static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id)
  * Quirk table for systems that misbehave (lock up, etc.) if port
  * Quirk table for systems that misbehave (lock up, etc.) if port
  * 0x80 is used:
  * 0x80 is used:
  */
  */
-static struct dmi_system_id __initdata io_delay_0xed_port_dmi_table[] = {
+static const struct dmi_system_id io_delay_0xed_port_dmi_table[] __initconst = {
 	{
 	{
 		.callback	= dmi_io_delay_0xed_port,
 		.callback	= dmi_io_delay_0xed_port,
 		.ident		= "Compaq Presario V6000",
 		.ident		= "Compaq Presario V6000",

+ 1 - 1
arch/x86/kernel/reboot.c

@@ -150,7 +150,7 @@ static int __init set_kbd_reboot(const struct dmi_system_id *d)
 /*
 /*
  * This is a single dmi_table handling all reboot quirks.
  * This is a single dmi_table handling all reboot quirks.
  */
  */
-static struct dmi_system_id __initdata reboot_dmi_table[] = {
+static const struct dmi_system_id reboot_dmi_table[] __initconst = {
 
 
 	/* Acer */
 	/* Acer */
 	{	/* Handle reboot issue on Acer Aspire one */
 	{	/* Handle reboot issue on Acer Aspire one */

+ 1 - 1
arch/x86/pci/irq.c

@@ -1092,7 +1092,7 @@ static int __init fix_acer_tm360_irqrouting(const struct dmi_system_id *d)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id __initdata pciirq_dmi_table[] = {
+static const struct dmi_system_id pciirq_dmi_table[] __initconst = {
 	{
 	{
 		.callback = fix_broken_hp_bios_irq9,
 		.callback = fix_broken_hp_bios_irq9,
 		.ident = "HP Pavilion N5400 Series Laptop",
 		.ident = "HP Pavilion N5400 Series Laptop",

+ 1 - 1
arch/x86/power/cpu.c

@@ -428,7 +428,7 @@ static int msr_initialize_bdw(const struct dmi_system_id *d)
 	return msr_init_context(bdw_msr_id, ARRAY_SIZE(bdw_msr_id));
 	return msr_init_context(bdw_msr_id, ARRAY_SIZE(bdw_msr_id));
 }
 }
 
 
-static struct dmi_system_id msr_save_dmi_table[] = {
+static const struct dmi_system_id msr_save_dmi_table[] = {
 	{
 	{
 	 .callback = msr_initialize_bdw,
 	 .callback = msr_initialize_bdw,
 	 .ident = "BROADWELL BDX_EP",
 	 .ident = "BROADWELL BDX_EP",

+ 1 - 1
drivers/acpi/acpi_video.c

@@ -418,7 +418,7 @@ static int video_set_report_key_events(const struct dmi_system_id *id)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id video_dmi_table[] = {
+static const struct dmi_system_id video_dmi_table[] = {
 	/*
 	/*
 	 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
 	 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
 	 */
 	 */

+ 2 - 2
drivers/acpi/blacklist.c

@@ -30,7 +30,7 @@
 
 
 #include "internal.h"
 #include "internal.h"
 
 
-static struct dmi_system_id acpi_rev_dmi_table[] __initdata;
+static const struct dmi_system_id acpi_rev_dmi_table[] __initconst;
 
 
 /*
 /*
  * POLICY: If *anything* doesn't work, put it on the blacklist.
  * 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)
 }
 }
 #endif
 #endif
 
 
-static struct dmi_system_id acpi_rev_dmi_table[] __initdata = {
+static const struct dmi_system_id acpi_rev_dmi_table[] __initconst = {
 #ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE
 #ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE
 	/*
 	/*
 	 * DELL XPS 13 (2015) switches sound between HDA and I2S
 	 * DELL XPS 13 (2015) switches sound between HDA and I2S

+ 2 - 2
drivers/acpi/bus.c

@@ -67,7 +67,7 @@ static int set_copy_dsdt(const struct dmi_system_id *id)
 }
 }
 #endif
 #endif
 
 
-static struct dmi_system_id dsdt_dmi_table[] __initdata = {
+static const struct dmi_system_id dsdt_dmi_table[] __initconst = {
 	/*
 	/*
 	 * Invoke DSDT corruption work-around on all Toshiba Satellite.
 	 * Invoke DSDT corruption work-around on all Toshiba Satellite.
 	 * https://bugzilla.kernel.org/show_bug.cgi?id=14679
 	 * https://bugzilla.kernel.org/show_bug.cgi?id=14679
@@ -83,7 +83,7 @@ static struct dmi_system_id dsdt_dmi_table[] __initdata = {
 	{}
 	{}
 };
 };
 #else
 #else
-static struct dmi_system_id dsdt_dmi_table[] __initdata = {
+static const struct dmi_system_id dsdt_dmi_table[] __initconst = {
 	{}
 	{}
 };
 };
 #endif
 #endif

+ 1 - 1
drivers/acpi/ec.c

@@ -1809,7 +1809,7 @@ static int ec_honor_ecdt_gpe(const struct dmi_system_id *id)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id ec_dmi_table[] __initdata = {
+static const struct dmi_system_id ec_dmi_table[] __initconst = {
 	{
 	{
 	ec_correct_ecdt, "MSI MS-171F", {
 	ec_correct_ecdt, "MSI MS-171F", {
 	DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star"),
 	DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star"),

+ 1 - 1
drivers/acpi/osi.c

@@ -312,7 +312,7 @@ static int __init dmi_disable_osi_win8(const struct dmi_system_id *d)
  * Note that _OSI("Linux")/_OSI("Darwin") determined here can be overridden
  * Note that _OSI("Linux")/_OSI("Darwin") determined here can be overridden
  * by acpi_osi=!Linux/acpi_osi=!Darwin command line options.
  * by acpi_osi=!Linux/acpi_osi=!Darwin command line options.
  */
  */
-static struct dmi_system_id acpi_osi_dmi_table[] __initdata = {
+static const struct dmi_system_id acpi_osi_dmi_table[] __initconst = {
 	{
 	{
 	.callback = dmi_disable_osi_vista,
 	.callback = dmi_disable_osi_vista,
 	.ident = "Fujitsu Siemens",
 	.ident = "Fujitsu Siemens",

+ 1 - 1
drivers/acpi/pci_slot.c

@@ -174,7 +174,7 @@ static int do_sta_before_sun(const struct dmi_system_id *d)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id acpi_pci_slot_dmi_table[] __initdata = {
+static const struct dmi_system_id acpi_pci_slot_dmi_table[] __initconst = {
 	/*
 	/*
 	 * Fujitsu Primequest machines will return 1023 to indicate an
 	 * Fujitsu Primequest machines will return 1023 to indicate an
 	 * error if the _SUN method is evaluated on SxFy objects that
 	 * error if the _SUN method is evaluated on SxFy objects that

+ 1 - 1
drivers/acpi/processor_pdc.c

@@ -173,7 +173,7 @@ static int __init set_no_mwait(const struct dmi_system_id *id)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id processor_idle_dmi_table[] __initdata = {
+static const struct dmi_system_id processor_idle_dmi_table[] __initconst = {
 	{
 	{
 	set_no_mwait, "Extensa 5220", {
 	set_no_mwait, "Extensa 5220", {
 	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),
 	DMI_MATCH(DMI_BIOS_VENDOR, "Phoenix Technologies LTD"),

+ 1 - 1
drivers/acpi/sleep.c

@@ -160,7 +160,7 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id acpisleep_dmi_table[] __initdata = {
+static const struct dmi_system_id acpisleep_dmi_table[] __initconst = {
 	{
 	{
 	.callback = init_old_suspend_ordering,
 	.callback = init_old_suspend_ordering,
 	.ident = "Abit KN9 (nForce4 variant)",
 	.ident = "Abit KN9 (nForce4 variant)",

+ 1 - 1
drivers/acpi/thermal.c

@@ -1209,7 +1209,7 @@ static int thermal_psv(const struct dmi_system_id *d) {
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id thermal_dmi_table[] __initdata = {
+static const struct dmi_system_id thermal_dmi_table[] __initconst = {
 	/*
 	/*
 	 * Award BIOS on this AOpen makes thermal control almost worthless.
 	 * Award BIOS on this AOpen makes thermal control almost worthless.
 	 * http://bugzilla.kernel.org/show_bug.cgi?id=8842
 	 * http://bugzilla.kernel.org/show_bug.cgi?id=8842

+ 1 - 1
drivers/char/sonypi.c

@@ -1491,7 +1491,7 @@ static struct platform_driver sonypi_driver = {
 
 
 static struct platform_device *sonypi_platform_device;
 static struct platform_device *sonypi_platform_device;
 
 
-static struct dmi_system_id __initdata sonypi_dmi_table[] = {
+static const struct dmi_system_id sonypi_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Sony Vaio",
 		.ident = "Sony Vaio",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/cpufreq/powernow-k7.c

@@ -578,7 +578,7 @@ static int acer_cpufreq_pst(const struct dmi_system_id *d)
  * A BIOS update is all that can save them.
  * A BIOS update is all that can save them.
  * Mention this, and disable cpufreq.
  * Mention this, and disable cpufreq.
  */
  */
-static struct dmi_system_id powernow_dmi_table[] = {
+static const struct dmi_system_id powernow_dmi_table[] = {
 	{
 	{
 		.callback = acer_cpufreq_pst,
 		.callback = acer_cpufreq_pst,
 		.ident = "Acer Aspire",
 		.ident = "Acer Aspire",

+ 1 - 1
drivers/firmware/google/gsmi.c

@@ -709,7 +709,7 @@ static u32 __init hash_oem_table_id(char s[8])
 	return local_hash_64(input, 32);
 	return local_hash_64(input, 32);
 }
 }
 
 
-static struct dmi_system_id gsmi_dmi_table[] __initdata = {
+static const struct dmi_system_id gsmi_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Google Board",
 		.ident = "Google Board",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/firmware/google/memconsole-x86-legacy.c

@@ -126,7 +126,7 @@ static bool memconsole_ebda_init(void)
 	return false;
 	return false;
 }
 }
 
 
-static struct dmi_system_id memconsole_dmi_table[] __initdata = {
+static const struct dmi_system_id memconsole_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Google Board",
 		.ident = "Google Board",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c

@@ -171,7 +171,7 @@ nvkm_gpio_fini(struct nvkm_subdev *subdev, bool suspend)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id gpio_reset_ids[] = {
+static const struct dmi_system_id gpio_reset_ids[] = {
 	{
 	{
 		.ident = "Apple Macbook 10,1",
 		.ident = "Apple Macbook 10,1",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/hwmon/acpi_power_meter.c

@@ -973,7 +973,7 @@ static int __init enable_cap_knobs(const struct dmi_system_id *d)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id __initdata pm_dmi_table[] = {
+static const struct dmi_system_id pm_dmi_table[] __initconst = {
 	{
 	{
 		enable_cap_knobs, "IBM Active Energy Manager",
 		enable_cap_knobs, "IBM Active Energy Manager",
 		{
 		{

+ 1 - 1
drivers/hwmon/applesmc.c

@@ -1247,7 +1247,7 @@ static int applesmc_dmi_match(const struct dmi_system_id *id)
  * Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
  * Note that DMI_MATCH(...,"MacBook") will match "MacBookPro1,1".
  * So we need to put "Apple MacBook Pro" before "Apple MacBook".
  * So we need to put "Apple MacBook Pro" before "Apple MacBook".
  */
  */
-static __initdata struct dmi_system_id applesmc_whitelist[] = {
+static const struct dmi_system_id applesmc_whitelist[] __initconst = {
 	{ applesmc_dmi_match, "Apple MacBook Air", {
 	{ applesmc_dmi_match, "Apple MacBook Air", {
 	  DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
 	  DMI_MATCH(DMI_BOARD_VENDOR, "Apple"),
 	  DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir") },
 	  DMI_MATCH(DMI_PRODUCT_NAME, "MacBookAir") },

+ 2 - 2
drivers/hwmon/dell-smm-hwmon.c

@@ -890,7 +890,7 @@ static const struct i8k_config_data i8k_config_data[] = {
 	},
 	},
 };
 };
 
 
-static struct dmi_system_id i8k_dmi_table[] __initdata = {
+static const struct dmi_system_id i8k_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Dell Inspiron",
 		.ident = "Dell Inspiron",
 		.matches = {
 		.matches = {
@@ -1013,7 +1013,7 @@ MODULE_DEVICE_TABLE(dmi, i8k_dmi_table);
  * of affected Dell machines for which we disallow I8K_SMM_GET_FAN_TYPE call.
  * of affected Dell machines for which we disallow I8K_SMM_GET_FAN_TYPE call.
  * See bug: https://bugzilla.kernel.org/show_bug.cgi?id=100121
  * See bug: https://bugzilla.kernel.org/show_bug.cgi?id=100121
  */
  */
-static struct dmi_system_id i8k_blacklist_fan_type_dmi_table[] __initdata = {
+static const struct dmi_system_id i8k_blacklist_fan_type_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Dell Studio XPS 8000",
 		.ident = "Dell Studio XPS 8000",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/input/touchscreen/htcpen.c

@@ -219,7 +219,7 @@ static struct isa_driver htcpen_isa_driver = {
 	}
 	}
 };
 };
 
 
-static struct dmi_system_id htcshift_dmi_table[] __initdata = {
+static const struct dmi_system_id htcshift_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Shift",
 		.ident = "Shift",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/leds/leds-clevo-mail.c

@@ -40,7 +40,7 @@ static int __init clevo_mail_led_dmi_callback(const struct dmi_system_id *id)
  * detected as working, but in reality it is not) as low as
  * detected as working, but in reality it is not) as low as
  * possible.
  * possible.
  */
  */
-static struct dmi_system_id clevo_mail_led_dmi_table[] __initdata = {
+static const struct dmi_system_id clevo_mail_led_dmi_table[] __initconst = {
 	{
 	{
 		.callback = clevo_mail_led_dmi_callback,
 		.callback = clevo_mail_led_dmi_callback,
 		.ident = "Clevo D410J",
 		.ident = "Clevo D410J",

+ 1 - 1
drivers/leds/leds-ss4200.c

@@ -91,7 +91,7 @@ MODULE_PARM_DESC(nodetect, "Skip DMI-based hardware detection");
  * detected as working, but in reality it is not) as low as
  * detected as working, but in reality it is not) as low as
  * possible.
  * possible.
  */
  */
-static struct dmi_system_id nas_led_whitelist[] __initdata = {
+static const struct dmi_system_id nas_led_whitelist[] __initconst = {
 	{
 	{
 		.callback = ss4200_led_dmi_callback,
 		.callback = ss4200_led_dmi_callback,
 		.ident = "Intel SS4200-E",
 		.ident = "Intel SS4200-E",

+ 1 - 1
drivers/mfd/kempld-core.c

@@ -494,7 +494,7 @@ static struct platform_driver kempld_driver = {
 	.remove		= kempld_remove,
 	.remove		= kempld_remove,
 };
 };
 
 
-static struct dmi_system_id kempld_dmi_table[] __initdata = {
+static const struct dmi_system_id kempld_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "BBD6",
 		.ident = "BBD6",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/net/ethernet/marvell/skge.c

@@ -4193,7 +4193,7 @@ static struct pci_driver skge_driver = {
 	.driver.pm =	SKGE_PM_OPS,
 	.driver.pm =	SKGE_PM_OPS,
 };
 };
 
 
-static struct dmi_system_id skge_32bit_dma_boards[] = {
+static const struct dmi_system_id skge_32bit_dma_boards[] = {
 	{
 	{
 		.ident = "Gigabyte nForce boards",
 		.ident = "Gigabyte nForce boards",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/net/ethernet/via/via-rhine.c

@@ -2598,7 +2598,7 @@ static struct platform_driver rhine_driver_platform = {
 	}
 	}
 };
 };
 
 
-static struct dmi_system_id rhine_dmi_table[] __initdata = {
+static const struct dmi_system_id rhine_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "EPIA-M",
 		.ident = "EPIA-M",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/pci/pcie/portdrv_pci.c

@@ -260,7 +260,7 @@ static int __init dmi_pcie_pme_disable_msi(const struct dmi_system_id *d)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id __initdata pcie_portdrv_dmi_table[] = {
+static const struct dmi_system_id pcie_portdrv_dmi_table[] __initconst = {
 	/*
 	/*
 	 * Boxes that should not use MSI for PCIe PME signaling.
 	 * Boxes that should not use MSI for PCIe PME signaling.
 	 */
 	 */

+ 1 - 1
drivers/pci/quirks.c

@@ -1707,7 +1707,7 @@ static int dmi_disable_ioapicreroute(const struct dmi_system_id *d)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id boot_interrupt_dmi_table[] = {
+static const struct dmi_system_id boot_interrupt_dmi_table[] = {
 	/*
 	/*
 	 * Systems to exclude from boot interrupt reroute quirks
 	 * Systems to exclude from boot interrupt reroute quirks
 	 */
 	 */

+ 1 - 1
drivers/platform/chrome/chromeos_laptop.c

@@ -518,7 +518,7 @@ static struct chromeos_laptop cr48 = {
 	.callback = chromeos_laptop_dmi_matched, \
 	.callback = chromeos_laptop_dmi_matched, \
 	.driver_data = (void *)&board_
 	.driver_data = (void *)&board_
 
 
-static struct dmi_system_id chromeos_laptop_dmi_table[] __initdata = {
+static const struct dmi_system_id chromeos_laptop_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Samsung Series 5 550",
 		.ident = "Samsung Series 5 550",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/platform/chrome/chromeos_pstore.c

@@ -14,7 +14,7 @@
 #include <linux/platform_device.h>
 #include <linux/platform_device.h>
 #include <linux/pstore_ram.h>
 #include <linux/pstore_ram.h>
 
 
-static struct dmi_system_id chromeos_pstore_dmi_table[] __initdata = {
+static const struct dmi_system_id chromeos_pstore_dmi_table[] __initconst = {
 	{
 	{
 		/*
 		/*
 		 * Today all Chromebooks/boxes ship with Google_* as version and
 		 * Today all Chromebooks/boxes ship with Google_* as version and

+ 1 - 1
drivers/platform/chrome/cros_ec_lpc.c

@@ -329,7 +329,7 @@ static const struct acpi_device_id cros_ec_lpc_acpi_device_ids[] = {
 };
 };
 MODULE_DEVICE_TABLE(acpi, cros_ec_lpc_acpi_device_ids);
 MODULE_DEVICE_TABLE(acpi, cros_ec_lpc_acpi_device_ids);
 
 
-static struct dmi_system_id cros_ec_lpc_dmi_table[] __initdata = {
+static const struct dmi_system_id cros_ec_lpc_dmi_table[] __initconst = {
 	{
 	{
 		/*
 		/*
 		 * Today all Chromebooks/boxes ship with Google_* as version and
 		 * Today all Chromebooks/boxes ship with Google_* as version and

+ 1 - 1
drivers/platform/x86/compal-laptop.c

@@ -805,7 +805,7 @@ static int dmi_check_cb_extra(const struct dmi_system_id *id)
 	return 1;
 	return 1;
 }
 }
 
 
-static struct dmi_system_id __initdata compal_dmi_table[] = {
+static const struct dmi_system_id compal_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "FL90/IFL90",
 		.ident = "FL90/IFL90",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/platform/x86/hdaps.c

@@ -514,7 +514,7 @@ static int __init hdaps_dmi_match_invert(const struct dmi_system_id *id)
    "ThinkPad T42p", so the order of the entries matters.
    "ThinkPad T42p", so the order of the entries matters.
    If your ThinkPad is not recognized, please update to latest
    If your ThinkPad is not recognized, please update to latest
    BIOS. This is especially the case for some R52 ThinkPads. */
    BIOS. This is especially the case for some R52 ThinkPads. */
-static struct dmi_system_id __initdata hdaps_whitelist[] = {
+static const struct dmi_system_id hdaps_whitelist[] __initconst = {
 	HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad R50p", HDAPS_BOTH_AXES),
 	HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad R50p", HDAPS_BOTH_AXES),
 	HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R50"),
 	HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R50"),
 	HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"),
 	HDAPS_DMI_MATCH_NORMAL("IBM", "ThinkPad R51"),

+ 1 - 1
drivers/platform/x86/ibm_rtl.c

@@ -227,7 +227,7 @@ static void rtl_teardown_sysfs(void) {
 }
 }
 
 
 
 
-static struct dmi_system_id __initdata ibm_rtl_dmi_table[] = {
+static const struct dmi_system_id ibm_rtl_dmi_table[] __initconst = {
 	{                                                  \
 	{                                                  \
 		.matches = {                               \
 		.matches = {                               \
 			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),  \
 			DMI_MATCH(DMI_SYS_VENDOR, "IBM"),  \

+ 1 - 1
drivers/platform/x86/intel_oaktrail.c

@@ -299,7 +299,7 @@ static int dmi_check_cb(const struct dmi_system_id *id)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id __initdata oaktrail_dmi_table[] = {
+static const struct dmi_system_id oaktrail_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "OakTrail platform",
 		.ident = "OakTrail platform",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/platform/x86/mlx-platform.c

@@ -247,7 +247,7 @@ static int __init mlxplat_dmi_msn21xx_matched(const struct dmi_system_id *dmi)
 	return 1;
 	return 1;
 };
 };
 
 
-static struct dmi_system_id mlxplat_dmi_table[] __initdata = {
+static const struct dmi_system_id mlxplat_dmi_table[] __initconst = {
 	{
 	{
 		.callback = mlxplat_dmi_default_matched,
 		.callback = mlxplat_dmi_default_matched,
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/platform/x86/msi-laptop.c

@@ -605,7 +605,7 @@ static int dmi_check_cb(const struct dmi_system_id *dmi)
 	return 1;
 	return 1;
 }
 }
 
 
-static struct dmi_system_id __initdata msi_dmi_table[] = {
+static const struct dmi_system_id msi_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "MSI S270",
 		.ident = "MSI S270",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/platform/x86/samsung-laptop.c

@@ -1567,7 +1567,7 @@ static int __init samsung_dmi_matched(const struct dmi_system_id *d)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id __initdata samsung_dmi_table[] = {
+static const struct dmi_system_id samsung_dmi_table[] __initconst = {
 	{
 	{
 		.matches = {
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR,
 			DMI_MATCH(DMI_SYS_VENDOR,

+ 1 - 1
drivers/platform/x86/samsung-q10.c

@@ -95,7 +95,7 @@ static int __init dmi_check_callback(const struct dmi_system_id *id)
 	return 1;
 	return 1;
 }
 }
 
 
-static struct dmi_system_id __initdata samsungq10_dmi_table[] = {
+static const struct dmi_system_id samsungq10_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Samsung Q10",
 		.ident = "Samsung Q10",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/platform/x86/sony-laptop.c

@@ -4880,7 +4880,7 @@ static struct acpi_driver sony_pic_driver = {
 	.drv.pm = &sony_pic_pm,
 	.drv.pm = &sony_pic_pm,
 };
 };
 
 
-static struct dmi_system_id __initdata sonypi_dmi_table[] = {
+static const struct dmi_system_id sonypi_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Sony Vaio",
 		.ident = "Sony Vaio",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/platform/x86/toshiba-wmi.c

@@ -64,7 +64,7 @@ static void toshiba_wmi_notify(u32 value, void *context)
 	kfree(response.pointer);
 	kfree(response.pointer);
 }
 }
 
 
-static struct dmi_system_id toshiba_wmi_dmi_table[] __initdata = {
+static const struct dmi_system_id toshiba_wmi_dmi_table[] __initconst = {
 	{
 	{
 		.ident = "Toshiba laptop",
 		.ident = "Toshiba laptop",
 		.matches = {
 		.matches = {

+ 1 - 1
drivers/pnp/pnpbios/core.c

@@ -495,7 +495,7 @@ static int __init exploding_pnp_bios(const struct dmi_system_id *d)
 	return 0;
 	return 0;
 }
 }
 
 
-static struct dmi_system_id pnpbios_dmi_table[] __initdata = {
+static const struct dmi_system_id pnpbios_dmi_table[] __initconst = {
 	{			/* PnPBIOS GPF on boot */
 	{			/* PnPBIOS GPF on boot */
 	 .callback = exploding_pnp_bios,
 	 .callback = exploding_pnp_bios,
 	 .ident = "Higraded P14H",
 	 .ident = "Higraded P14H",

+ 1 - 1
drivers/tty/serial/pch_uart.c

@@ -371,7 +371,7 @@ static const struct file_operations port_regs_ops = {
 };
 };
 #endif	/* CONFIG_DEBUG_FS */
 #endif	/* CONFIG_DEBUG_FS */
 
 
-static struct dmi_system_id pch_uart_dmi_table[] = {
+static const struct dmi_system_id pch_uart_dmi_table[] = {
 	{
 	{
 		.ident = "CM-iTC",
 		.ident = "CM-iTC",
 		{
 		{

+ 1 - 1
drivers/video/backlight/kb3886_bl.c

@@ -78,7 +78,7 @@ static struct kb3886bl_machinfo *bl_machinfo;
 static unsigned long kb3886bl_flags;
 static unsigned long kb3886bl_flags;
 #define KB3886BL_SUSPENDED     0x01
 #define KB3886BL_SUSPENDED     0x01
 
 
-static struct dmi_system_id kb3886bl_device_table[] __initdata = {
+static const struct dmi_system_id kb3886bl_device_table[] __initconst = {
 	{
 	{
 		.ident = "Sahara Touch-iT",
 		.ident = "Sahara Touch-iT",
 		.matches = {
 		.matches = {

+ 1 - 1
sound/soc/codecs/rt5645.c

@@ -3600,7 +3600,7 @@ static const struct rt5645_platform_data buddy_platform_data = {
 	.level_trigger_irq = true,
 	.level_trigger_irq = true,
 };
 };
 
 
-static struct dmi_system_id dmi_platform_intel_broadwell[] = {
+static const struct dmi_system_id dmi_platform_intel_broadwell[] = {
 	{
 	{
 		.ident = "Chrome Buddy",
 		.ident = "Chrome Buddy",
 		.matches = {
 		.matches = {