diff options
35 files changed, 103 insertions, 97 deletions
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index cacdd883bf2b..afd2afe9102d 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -907,7 +907,7 @@ static void __init acpi_process_madt(void) | |||
907 | 907 | ||
908 | #ifdef __i386__ | 908 | #ifdef __i386__ |
909 | 909 | ||
910 | static int __init disable_acpi_irq(struct dmi_system_id *d) | 910 | static int __init disable_acpi_irq(const struct dmi_system_id *d) |
911 | { | 911 | { |
912 | if (!acpi_force) { | 912 | if (!acpi_force) { |
913 | printk(KERN_NOTICE "%s detected: force use of acpi=noirq\n", | 913 | printk(KERN_NOTICE "%s detected: force use of acpi=noirq\n", |
@@ -917,7 +917,7 @@ static int __init disable_acpi_irq(struct dmi_system_id *d) | |||
917 | return 0; | 917 | return 0; |
918 | } | 918 | } |
919 | 919 | ||
920 | static int __init disable_acpi_pci(struct dmi_system_id *d) | 920 | static int __init disable_acpi_pci(const struct dmi_system_id *d) |
921 | { | 921 | { |
922 | if (!acpi_force) { | 922 | if (!acpi_force) { |
923 | printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", | 923 | printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", |
@@ -927,7 +927,7 @@ static int __init disable_acpi_pci(struct dmi_system_id *d) | |||
927 | return 0; | 927 | return 0; |
928 | } | 928 | } |
929 | 929 | ||
930 | static int __init dmi_disable_acpi(struct dmi_system_id *d) | 930 | static int __init dmi_disable_acpi(const struct dmi_system_id *d) |
931 | { | 931 | { |
932 | if (!acpi_force) { | 932 | if (!acpi_force) { |
933 | printk(KERN_NOTICE "%s detected: acpi off\n", d->ident); | 933 | printk(KERN_NOTICE "%s detected: acpi off\n", d->ident); |
@@ -942,7 +942,7 @@ static int __init dmi_disable_acpi(struct dmi_system_id *d) | |||
942 | /* | 942 | /* |
943 | * Limit ACPI to CPU enumeration for HT | 943 | * Limit ACPI to CPU enumeration for HT |
944 | */ | 944 | */ |
945 | static int __init force_acpi_ht(struct dmi_system_id *d) | 945 | static int __init force_acpi_ht(const struct dmi_system_id *d) |
946 | { | 946 | { |
947 | if (!acpi_force) { | 947 | if (!acpi_force) { |
948 | printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", | 948 | printk(KERN_NOTICE "%s detected: force use of acpi=ht\n", |
diff --git a/arch/i386/kernel/acpi/sleep.c b/arch/i386/kernel/acpi/sleep.c index c42b5ab49deb..10699489cfe7 100644 --- a/arch/i386/kernel/acpi/sleep.c +++ b/arch/i386/kernel/acpi/sleep.c | |||
@@ -84,7 +84,7 @@ __setup("acpi_sleep=", acpi_sleep_setup); | |||
84 | 84 | ||
85 | /* Ouch, we want to delete this. We already have better version in userspace, in | 85 | /* Ouch, we want to delete this. We already have better version in userspace, in |
86 | s2ram from suspend.sf.net project */ | 86 | s2ram from suspend.sf.net project */ |
87 | static __init int reset_videomode_after_s3(struct dmi_system_id *d) | 87 | static __init int reset_videomode_after_s3(const struct dmi_system_id *d) |
88 | { | 88 | { |
89 | acpi_realmode_flags |= 2; | 89 | acpi_realmode_flags |= 2; |
90 | return 0; | 90 | return 0; |
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index f02a8aca826b..32f2365c26ed 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
@@ -1869,7 +1869,7 @@ static struct miscdevice apm_device = { | |||
1869 | 1869 | ||
1870 | 1870 | ||
1871 | /* Simple "print if true" callback */ | 1871 | /* Simple "print if true" callback */ |
1872 | static int __init print_if_true(struct dmi_system_id *d) | 1872 | static int __init print_if_true(const struct dmi_system_id *d) |
1873 | { | 1873 | { |
1874 | printk("%s\n", d->ident); | 1874 | printk("%s\n", d->ident); |
1875 | return 0; | 1875 | return 0; |
@@ -1879,14 +1879,14 @@ static int __init print_if_true(struct dmi_system_id *d) | |||
1879 | * Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it was | 1879 | * Some Bioses enable the PS/2 mouse (touchpad) at resume, even if it was |
1880 | * disabled before the suspend. Linux used to get terribly confused by that. | 1880 | * disabled before the suspend. Linux used to get terribly confused by that. |
1881 | */ | 1881 | */ |
1882 | static int __init broken_ps2_resume(struct dmi_system_id *d) | 1882 | static int __init broken_ps2_resume(const struct dmi_system_id *d) |
1883 | { | 1883 | { |
1884 | printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround hopefully not needed.\n", d->ident); | 1884 | printk(KERN_INFO "%s machine detected. Mousepad Resume Bug workaround hopefully not needed.\n", d->ident); |
1885 | return 0; | 1885 | return 0; |
1886 | } | 1886 | } |
1887 | 1887 | ||
1888 | /* Some bioses have a broken protected mode poweroff and need to use realmode */ | 1888 | /* Some bioses have a broken protected mode poweroff and need to use realmode */ |
1889 | static int __init set_realmode_power_off(struct dmi_system_id *d) | 1889 | static int __init set_realmode_power_off(const struct dmi_system_id *d) |
1890 | { | 1890 | { |
1891 | if (apm_info.realmode_power_off == 0) { | 1891 | if (apm_info.realmode_power_off == 0) { |
1892 | apm_info.realmode_power_off = 1; | 1892 | apm_info.realmode_power_off = 1; |
@@ -1896,7 +1896,7 @@ static int __init set_realmode_power_off(struct dmi_system_id *d) | |||
1896 | } | 1896 | } |
1897 | 1897 | ||
1898 | /* Some laptops require interrupts to be enabled during APM calls */ | 1898 | /* Some laptops require interrupts to be enabled during APM calls */ |
1899 | static int __init set_apm_ints(struct dmi_system_id *d) | 1899 | static int __init set_apm_ints(const struct dmi_system_id *d) |
1900 | { | 1900 | { |
1901 | if (apm_info.allow_ints == 0) { | 1901 | if (apm_info.allow_ints == 0) { |
1902 | apm_info.allow_ints = 1; | 1902 | apm_info.allow_ints = 1; |
@@ -1906,7 +1906,7 @@ static int __init set_apm_ints(struct dmi_system_id *d) | |||
1906 | } | 1906 | } |
1907 | 1907 | ||
1908 | /* Some APM bioses corrupt memory or just plain do not work */ | 1908 | /* Some APM bioses corrupt memory or just plain do not work */ |
1909 | static int __init apm_is_horked(struct dmi_system_id *d) | 1909 | static int __init apm_is_horked(const struct dmi_system_id *d) |
1910 | { | 1910 | { |
1911 | if (apm_info.disabled == 0) { | 1911 | if (apm_info.disabled == 0) { |
1912 | apm_info.disabled = 1; | 1912 | apm_info.disabled = 1; |
@@ -1915,7 +1915,7 @@ static int __init apm_is_horked(struct dmi_system_id *d) | |||
1915 | return 0; | 1915 | return 0; |
1916 | } | 1916 | } |
1917 | 1917 | ||
1918 | static int __init apm_is_horked_d850md(struct dmi_system_id *d) | 1918 | static int __init apm_is_horked_d850md(const struct dmi_system_id *d) |
1919 | { | 1919 | { |
1920 | if (apm_info.disabled == 0) { | 1920 | if (apm_info.disabled == 0) { |
1921 | apm_info.disabled = 1; | 1921 | apm_info.disabled = 1; |
@@ -1927,7 +1927,7 @@ static int __init apm_is_horked_d850md(struct dmi_system_id *d) | |||
1927 | } | 1927 | } |
1928 | 1928 | ||
1929 | /* Some APM bioses hang on APM idle calls */ | 1929 | /* Some APM bioses hang on APM idle calls */ |
1930 | static int __init apm_likes_to_melt(struct dmi_system_id *d) | 1930 | static int __init apm_likes_to_melt(const struct dmi_system_id *d) |
1931 | { | 1931 | { |
1932 | if (apm_info.forbid_idle == 0) { | 1932 | if (apm_info.forbid_idle == 0) { |
1933 | apm_info.forbid_idle = 1; | 1933 | apm_info.forbid_idle = 1; |
@@ -1951,7 +1951,7 @@ static int __init apm_likes_to_melt(struct dmi_system_id *d) | |||
1951 | * Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e) | 1951 | * Phoenix A04 08/24/2000 is known bad (Dell Inspiron 5000e) |
1952 | * Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000) | 1952 | * Phoenix A07 09/29/2000 is known good (Dell Inspiron 5000) |
1953 | */ | 1953 | */ |
1954 | static int __init broken_apm_power(struct dmi_system_id *d) | 1954 | static int __init broken_apm_power(const struct dmi_system_id *d) |
1955 | { | 1955 | { |
1956 | apm_info.get_power_status_broken = 1; | 1956 | apm_info.get_power_status_broken = 1; |
1957 | printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n"); | 1957 | printk(KERN_WARNING "BIOS strings suggest APM bugs, disabling power status reporting.\n"); |
@@ -1962,7 +1962,7 @@ static int __init broken_apm_power(struct dmi_system_id *d) | |||
1962 | * This bios swaps the APM minute reporting bytes over (Many sony laptops | 1962 | * This bios swaps the APM minute reporting bytes over (Many sony laptops |
1963 | * have this problem). | 1963 | * have this problem). |
1964 | */ | 1964 | */ |
1965 | static int __init swab_apm_power_in_minutes(struct dmi_system_id *d) | 1965 | static int __init swab_apm_power_in_minutes(const struct dmi_system_id *d) |
1966 | { | 1966 | { |
1967 | apm_info.get_power_status_swabinminutes = 1; | 1967 | apm_info.get_power_status_swabinminutes = 1; |
1968 | printk(KERN_WARNING "BIOS strings suggest APM reports battery life in minutes and wrong byte order.\n"); | 1968 | printk(KERN_WARNING "BIOS strings suggest APM reports battery life in minutes and wrong byte order.\n"); |
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c index 705e13a30781..b6434a7ef8b2 100644 --- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -533,13 +533,13 @@ static int __init acpi_cpufreq_early_init(void) | |||
533 | */ | 533 | */ |
534 | static int bios_with_sw_any_bug; | 534 | static int bios_with_sw_any_bug; |
535 | 535 | ||
536 | static int sw_any_bug_found(struct dmi_system_id *d) | 536 | static int sw_any_bug_found(const struct dmi_system_id *d) |
537 | { | 537 | { |
538 | bios_with_sw_any_bug = 1; | 538 | bios_with_sw_any_bug = 1; |
539 | return 0; | 539 | return 0; |
540 | } | 540 | } |
541 | 541 | ||
542 | static struct dmi_system_id sw_any_bug_dmi_table[] = { | 542 | static const struct dmi_system_id sw_any_bug_dmi_table[] = { |
543 | { | 543 | { |
544 | .callback = sw_any_bug_found, | 544 | .callback = sw_any_bug_found, |
545 | .ident = "Supermicro Server X6DLP", | 545 | .ident = "Supermicro Server X6DLP", |
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index 0d796248866c..b37ed226830a 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c | |||
@@ -79,7 +79,7 @@ __setup("reboot=", reboot_setup); | |||
79 | /* | 79 | /* |
80 | * Some machines require the "reboot=b" commandline option, this quirk makes that automatic. | 80 | * Some machines require the "reboot=b" commandline option, this quirk makes that automatic. |
81 | */ | 81 | */ |
82 | static int __init set_bios_reboot(struct dmi_system_id *d) | 82 | static int __init set_bios_reboot(const struct dmi_system_id *d) |
83 | { | 83 | { |
84 | if (!reboot_thru_bios) { | 84 | if (!reboot_thru_bios) { |
85 | reboot_thru_bios = 1; | 85 | reboot_thru_bios = 1; |
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c index a39280b4dd3a..3ed0ae8c918d 100644 --- a/arch/i386/kernel/tsc.c +++ b/arch/i386/kernel/tsc.c | |||
@@ -305,7 +305,7 @@ void mark_tsc_unstable(char *reason) | |||
305 | } | 305 | } |
306 | EXPORT_SYMBOL_GPL(mark_tsc_unstable); | 306 | EXPORT_SYMBOL_GPL(mark_tsc_unstable); |
307 | 307 | ||
308 | static int __init dmi_mark_tsc_unstable(struct dmi_system_id *d) | 308 | static int __init dmi_mark_tsc_unstable(const struct dmi_system_id *d) |
309 | { | 309 | { |
310 | printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", | 310 | printk(KERN_NOTICE "%s detected: marking TSC unstable.\n", |
311 | d->ident); | 311 | d->ident); |
diff --git a/arch/i386/mach-generic/bigsmp.c b/arch/i386/mach-generic/bigsmp.c index 58a477baec30..292a225edabe 100644 --- a/arch/i386/mach-generic/bigsmp.c +++ b/arch/i386/mach-generic/bigsmp.c | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | static int dmi_bigsmp; /* can be set by dmi scanners */ | 22 | static int dmi_bigsmp; /* can be set by dmi scanners */ |
23 | 23 | ||
24 | static int hp_ht_bigsmp(struct dmi_system_id *d) | 24 | static int hp_ht_bigsmp(const struct dmi_system_id *d) |
25 | { | 25 | { |
26 | #ifdef CONFIG_X86_GENERICARCH | 26 | #ifdef CONFIG_X86_GENERICARCH |
27 | printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident); | 27 | printk(KERN_NOTICE "%s detected: force use of apic=bigsmp\n", d->ident); |
@@ -31,7 +31,7 @@ static int hp_ht_bigsmp(struct dmi_system_id *d) | |||
31 | } | 31 | } |
32 | 32 | ||
33 | 33 | ||
34 | static struct dmi_system_id bigsmp_dmi_table[] = { | 34 | static const struct dmi_system_id bigsmp_dmi_table[] = { |
35 | { hp_ht_bigsmp, "HP ProLiant DL760 G2", { | 35 | { hp_ht_bigsmp, "HP ProLiant DL760 G2", { |
36 | DMI_MATCH(DMI_BIOS_VENDOR, "HP"), | 36 | DMI_MATCH(DMI_BIOS_VENDOR, "HP"), |
37 | DMI_MATCH(DMI_BIOS_VERSION, "P44-"), | 37 | DMI_MATCH(DMI_BIOS_VERSION, "P44-"), |
diff --git a/arch/i386/pci/common.c b/arch/i386/pci/common.c index ebc6f3c66340..07d5223442bf 100644 --- a/arch/i386/pci/common.c +++ b/arch/i386/pci/common.c | |||
@@ -123,7 +123,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *b) | |||
123 | * on the kernel command line (which was parsed earlier). | 123 | * on the kernel command line (which was parsed earlier). |
124 | */ | 124 | */ |
125 | 125 | ||
126 | static int __devinit set_bf_sort(struct dmi_system_id *d) | 126 | static int __devinit set_bf_sort(const struct dmi_system_id *d) |
127 | { | 127 | { |
128 | if (pci_bf_sort == pci_bf_sort_default) { | 128 | if (pci_bf_sort == pci_bf_sort_default) { |
129 | pci_bf_sort = pci_dmi_bf; | 129 | pci_bf_sort = pci_dmi_bf; |
@@ -136,7 +136,7 @@ static int __devinit set_bf_sort(struct dmi_system_id *d) | |||
136 | * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) | 136 | * Enable renumbering of PCI bus# ranges to reach all PCI busses (Cardbus) |
137 | */ | 137 | */ |
138 | #ifdef __i386__ | 138 | #ifdef __i386__ |
139 | static int __devinit assign_all_busses(struct dmi_system_id *d) | 139 | static int __devinit assign_all_busses(const struct dmi_system_id *d) |
140 | { | 140 | { |
141 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; | 141 | pci_probe |= PCI_ASSIGN_ALL_BUSSES; |
142 | printk(KERN_INFO "%s detected: enabling PCI bus# renumbering" | 142 | printk(KERN_INFO "%s detected: enabling PCI bus# renumbering" |
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c index 8434f2323b87..d98c6b096f8e 100644 --- a/arch/i386/pci/irq.c +++ b/arch/i386/pci/irq.c | |||
@@ -1010,7 +1010,7 @@ static void __init pcibios_fixup_irqs(void) | |||
1010 | * Work around broken HP Pavilion Notebooks which assign USB to | 1010 | * Work around broken HP Pavilion Notebooks which assign USB to |
1011 | * IRQ 9 even though it is actually wired to IRQ 11 | 1011 | * IRQ 9 even though it is actually wired to IRQ 11 |
1012 | */ | 1012 | */ |
1013 | static int __init fix_broken_hp_bios_irq9(struct dmi_system_id *d) | 1013 | static int __init fix_broken_hp_bios_irq9(const struct dmi_system_id *d) |
1014 | { | 1014 | { |
1015 | if (!broken_hp_bios_irq9) { | 1015 | if (!broken_hp_bios_irq9) { |
1016 | broken_hp_bios_irq9 = 1; | 1016 | broken_hp_bios_irq9 = 1; |
@@ -1023,7 +1023,7 @@ static int __init fix_broken_hp_bios_irq9(struct dmi_system_id *d) | |||
1023 | * Work around broken Acer TravelMate 360 Notebooks which assign | 1023 | * Work around broken Acer TravelMate 360 Notebooks which assign |
1024 | * Cardbus to IRQ 11 even though it is actually wired to IRQ 10 | 1024 | * Cardbus to IRQ 11 even though it is actually wired to IRQ 10 |
1025 | */ | 1025 | */ |
1026 | static int __init fix_acer_tm360_irqrouting(struct dmi_system_id *d) | 1026 | static int __init fix_acer_tm360_irqrouting(const struct dmi_system_id *d) |
1027 | { | 1027 | { |
1028 | if (!acer_tm360_irqrouting) { | 1028 | if (!acer_tm360_irqrouting) { |
1029 | acer_tm360_irqrouting = 1; | 1029 | acer_tm360_irqrouting = 1; |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 12c09fafce9a..352cf81af581 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -1214,7 +1214,7 @@ acpi_os_validate_address ( | |||
1214 | } | 1214 | } |
1215 | 1215 | ||
1216 | #ifdef CONFIG_DMI | 1216 | #ifdef CONFIG_DMI |
1217 | static int dmi_osi_linux(struct dmi_system_id *d) | 1217 | static int dmi_osi_linux(const struct dmi_system_id *d) |
1218 | { | 1218 | { |
1219 | printk(KERN_NOTICE "%s detected: enabling _OSI(Linux)\n", d->ident); | 1219 | printk(KERN_NOTICE "%s detected: enabling _OSI(Linux)\n", d->ident); |
1220 | enable_osi_linux(1); | 1220 | enable_osi_linux(1); |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index f18261368e76..1e8287b4f40c 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -92,7 +92,7 @@ module_param(bm_history, uint, 0644); | |||
92 | * | 92 | * |
93 | * To skip this limit, boot/load with a large max_cstate limit. | 93 | * To skip this limit, boot/load with a large max_cstate limit. |
94 | */ | 94 | */ |
95 | static int set_max_cstate(struct dmi_system_id *id) | 95 | static int set_max_cstate(const struct dmi_system_id *id) |
96 | { | 96 | { |
97 | if (max_cstate > ACPI_PROCESSOR_MAX_POWER) | 97 | if (max_cstate > ACPI_PROCESSOR_MAX_POWER) |
98 | return 0; | 98 | return 0; |
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 2cbb9aabd00e..5055acf2163c 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -215,7 +215,7 @@ static struct pm_ops acpi_pm_ops = { | |||
215 | * Toshiba fails to preserve interrupts over S1, reinitialization | 215 | * Toshiba fails to preserve interrupts over S1, reinitialization |
216 | * of 8259 is needed after S1 resume. | 216 | * of 8259 is needed after S1 resume. |
217 | */ | 217 | */ |
218 | static int __init init_ints_after_s1(struct dmi_system_id *d) | 218 | static int __init init_ints_after_s1(const struct dmi_system_id *d) |
219 | { | 219 | { |
220 | printk(KERN_WARNING "%s with broken S1 detected.\n", d->ident); | 220 | printk(KERN_WARNING "%s with broken S1 detected.\n", d->ident); |
221 | init_8259A_after_S1 = 1; | 221 | init_8259A_after_S1 = 1; |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index bc6d5866ef98..ad898e10c1a9 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -1360,7 +1360,7 @@ static int acpi_thermal_resume(struct acpi_device *device) | |||
1360 | } | 1360 | } |
1361 | 1361 | ||
1362 | #ifdef CONFIG_DMI | 1362 | #ifdef CONFIG_DMI |
1363 | static int thermal_act(struct dmi_system_id *d) { | 1363 | static int thermal_act(const struct dmi_system_id *d) { |
1364 | 1364 | ||
1365 | if (act == 0) { | 1365 | if (act == 0) { |
1366 | printk(KERN_NOTICE "ACPI: %s detected: " | 1366 | printk(KERN_NOTICE "ACPI: %s detected: " |
@@ -1369,14 +1369,14 @@ static int thermal_act(struct dmi_system_id *d) { | |||
1369 | } | 1369 | } |
1370 | return 0; | 1370 | return 0; |
1371 | } | 1371 | } |
1372 | static int thermal_nocrt(struct dmi_system_id *d) { | 1372 | static int thermal_nocrt(const struct dmi_system_id *d) { |
1373 | 1373 | ||
1374 | printk(KERN_NOTICE "ACPI: %s detected: " | 1374 | printk(KERN_NOTICE "ACPI: %s detected: " |
1375 | "disabling all critical thermal trip point actions.\n", d->ident); | 1375 | "disabling all critical thermal trip point actions.\n", d->ident); |
1376 | nocrt = 1; | 1376 | nocrt = 1; |
1377 | return 0; | 1377 | return 0; |
1378 | } | 1378 | } |
1379 | static int thermal_tzp(struct dmi_system_id *d) { | 1379 | static int thermal_tzp(const struct dmi_system_id *d) { |
1380 | 1380 | ||
1381 | if (tzp == 0) { | 1381 | if (tzp == 0) { |
1382 | printk(KERN_NOTICE "ACPI: %s detected: " | 1382 | printk(KERN_NOTICE "ACPI: %s detected: " |
@@ -1385,7 +1385,7 @@ static int thermal_tzp(struct dmi_system_id *d) { | |||
1385 | } | 1385 | } |
1386 | return 0; | 1386 | return 0; |
1387 | } | 1387 | } |
1388 | static int thermal_psv(struct dmi_system_id *d) { | 1388 | static int thermal_psv(const struct dmi_system_id *d) { |
1389 | 1389 | ||
1390 | if (psv == 0) { | 1390 | if (psv == 0) { |
1391 | printk(KERN_NOTICE "ACPI: %s detected: " | 1391 | printk(KERN_NOTICE "ACPI: %s detected: " |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 6996eb5b7506..92c2d5082bef 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -919,7 +919,7 @@ static void ich_set_dmamode (struct ata_port *ap, struct ata_device *adev) | |||
919 | #ifdef CONFIG_PM | 919 | #ifdef CONFIG_PM |
920 | static int piix_broken_suspend(void) | 920 | static int piix_broken_suspend(void) |
921 | { | 921 | { |
922 | static struct dmi_system_id sysids[] = { | 922 | static const struct dmi_system_id sysids[] = { |
923 | { | 923 | { |
924 | .ident = "TECRA M3", | 924 | .ident = "TECRA M3", |
925 | .matches = { | 925 | .matches = { |
@@ -1183,7 +1183,7 @@ static void __devinit piix_init_sata_map(struct pci_dev *pdev, | |||
1183 | 1183 | ||
1184 | static void piix_iocfg_bit18_quirk(struct pci_dev *pdev) | 1184 | static void piix_iocfg_bit18_quirk(struct pci_dev *pdev) |
1185 | { | 1185 | { |
1186 | static struct dmi_system_id sysids[] = { | 1186 | static const struct dmi_system_id sysids[] = { |
1187 | { | 1187 | { |
1188 | /* Clevo M570U sets IOCFG bit 18 if the cdrom | 1188 | /* Clevo M570U sets IOCFG bit 18 if the cdrom |
1189 | * isn't used to boot the system which | 1189 | * isn't used to boot the system which |
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 71bdc3b3189c..32a10c99c06f 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
@@ -40,7 +40,7 @@ | |||
40 | * Cable special cases | 40 | * Cable special cases |
41 | */ | 41 | */ |
42 | 42 | ||
43 | static struct dmi_system_id cable_dmi_table[] = { | 43 | static const struct dmi_system_id cable_dmi_table[] = { |
44 | { | 44 | { |
45 | .ident = "HP Pavilion N5430", | 45 | .ident = "HP Pavilion N5430", |
46 | .matches = { | 46 | .matches = { |
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c index c6066aa43ec8..eaaea848b649 100644 --- a/drivers/ata/pata_cs5530.c +++ b/drivers/ata/pata_cs5530.c | |||
@@ -214,7 +214,7 @@ static struct ata_port_operations cs5530_port_ops = { | |||
214 | .port_start = ata_port_start, | 214 | .port_start = ata_port_start, |
215 | }; | 215 | }; |
216 | 216 | ||
217 | static struct dmi_system_id palmax_dmi_table[] = { | 217 | static const struct dmi_system_id palmax_dmi_table[] = { |
218 | { | 218 | { |
219 | .ident = "Palmax PD1100", | 219 | .ident = "Palmax PD1100", |
220 | .matches = { | 220 | .matches = { |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 636c4f1a0b24..f143db4559e0 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -129,7 +129,7 @@ static const struct via_isa_bridge { | |||
129 | * Cable special cases | 129 | * Cable special cases |
130 | */ | 130 | */ |
131 | 131 | ||
132 | static struct dmi_system_id cable_dmi_table[] = { | 132 | static const struct dmi_system_id cable_dmi_table[] = { |
133 | { | 133 | { |
134 | .ident = "Acer Ferrari 3400", | 134 | .ident = "Acer Ferrari 3400", |
135 | .matches = { | 135 | .matches = { |
diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c index 0289705967de..cd406416effd 100644 --- a/drivers/char/i8k.c +++ b/drivers/char/i8k.c | |||
@@ -98,9 +98,9 @@ struct smm_regs { | |||
98 | unsigned int edi __attribute__ ((packed)); | 98 | unsigned int edi __attribute__ ((packed)); |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static inline char *i8k_get_dmi_data(int field) | 101 | static inline const char *i8k_get_dmi_data(int field) |
102 | { | 102 | { |
103 | char *dmi_data = dmi_get_system_info(field); | 103 | const char *dmi_data = dmi_get_system_info(field); |
104 | 104 | ||
105 | return dmi_data && *dmi_data ? dmi_data : "?"; | 105 | return dmi_data && *dmi_data ? dmi_data : "?"; |
106 | } | 106 | } |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index dd441ff4af56..7901d5f218ec 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
@@ -1965,10 +1965,10 @@ struct dmi_ipmi_data | |||
1965 | u8 slave_addr; | 1965 | u8 slave_addr; |
1966 | }; | 1966 | }; |
1967 | 1967 | ||
1968 | static int __devinit decode_dmi(struct dmi_header *dm, | 1968 | static int __devinit decode_dmi(const struct dmi_header *dm, |
1969 | struct dmi_ipmi_data *dmi) | 1969 | struct dmi_ipmi_data *dmi) |
1970 | { | 1970 | { |
1971 | u8 *data = (u8 *)dm; | 1971 | const u8 *data = (const u8 *)dm; |
1972 | unsigned long base_addr; | 1972 | unsigned long base_addr; |
1973 | u8 reg_spacing; | 1973 | u8 reg_spacing; |
1974 | u8 len = dm->length; | 1974 | u8 len = dm->length; |
@@ -2091,13 +2091,14 @@ static __devinit void try_init_dmi(struct dmi_ipmi_data *ipmi_data) | |||
2091 | 2091 | ||
2092 | static void __devinit dmi_find_bmc(void) | 2092 | static void __devinit dmi_find_bmc(void) |
2093 | { | 2093 | { |
2094 | struct dmi_device *dev = NULL; | 2094 | const struct dmi_device *dev = NULL; |
2095 | struct dmi_ipmi_data data; | 2095 | struct dmi_ipmi_data data; |
2096 | int rv; | 2096 | int rv; |
2097 | 2097 | ||
2098 | while ((dev = dmi_find_device(DMI_DEV_TYPE_IPMI, NULL, dev))) { | 2098 | while ((dev = dmi_find_device(DMI_DEV_TYPE_IPMI, NULL, dev))) { |
2099 | memset(&data, 0, sizeof(data)); | 2099 | memset(&data, 0, sizeof(data)); |
2100 | rv = decode_dmi((struct dmi_header *) dev->device_data, &data); | 2100 | rv = decode_dmi((const struct dmi_header *) dev->device_data, |
2101 | &data); | ||
2101 | if (!rv) | 2102 | if (!rv) |
2102 | try_init_dmi(&data); | 2103 | try_init_dmi(&data); |
2103 | } | 2104 | } |
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index f7318b3b51f2..0cdadea7a40e 100644 --- a/drivers/firmware/dmi_scan.c +++ b/drivers/firmware/dmi_scan.c | |||
@@ -8,9 +8,9 @@ | |||
8 | #include <linux/slab.h> | 8 | #include <linux/slab.h> |
9 | #include <asm/dmi.h> | 9 | #include <asm/dmi.h> |
10 | 10 | ||
11 | static char * __init dmi_string(struct dmi_header *dm, u8 s) | 11 | static char * __init dmi_string(const struct dmi_header *dm, u8 s) |
12 | { | 12 | { |
13 | u8 *bp = ((u8 *) dm) + dm->length; | 13 | const u8 *bp = ((u8 *) dm) + dm->length; |
14 | char *str = ""; | 14 | char *str = ""; |
15 | 15 | ||
16 | if (s) { | 16 | if (s) { |
@@ -37,7 +37,7 @@ static char * __init dmi_string(struct dmi_header *dm, u8 s) | |||
37 | * pointing to completely the wrong place for example | 37 | * pointing to completely the wrong place for example |
38 | */ | 38 | */ |
39 | static int __init dmi_table(u32 base, int len, int num, | 39 | static int __init dmi_table(u32 base, int len, int num, |
40 | void (*decode)(struct dmi_header *)) | 40 | void (*decode)(const struct dmi_header *)) |
41 | { | 41 | { |
42 | u8 *buf, *data; | 42 | u8 *buf, *data; |
43 | int i = 0; | 43 | int i = 0; |
@@ -53,7 +53,8 @@ static int __init dmi_table(u32 base, int len, int num, | |||
53 | * OR we run off the end of the table (also happens) | 53 | * OR we run off the end of the table (also happens) |
54 | */ | 54 | */ |
55 | while ((i < num) && (data - buf + sizeof(struct dmi_header)) <= len) { | 55 | while ((i < num) && (data - buf + sizeof(struct dmi_header)) <= len) { |
56 | struct dmi_header *dm = (struct dmi_header *)data; | 56 | const struct dmi_header *dm = (const struct dmi_header *)data; |
57 | |||
57 | /* | 58 | /* |
58 | * We want to know the total length (formated area and strings) | 59 | * We want to know the total length (formated area and strings) |
59 | * before decoding to make sure we won't run off the table in | 60 | * before decoding to make sure we won't run off the table in |
@@ -71,7 +72,7 @@ static int __init dmi_table(u32 base, int len, int num, | |||
71 | return 0; | 72 | return 0; |
72 | } | 73 | } |
73 | 74 | ||
74 | static int __init dmi_checksum(u8 *buf) | 75 | static int __init dmi_checksum(const u8 *buf) |
75 | { | 76 | { |
76 | u8 sum = 0; | 77 | u8 sum = 0; |
77 | int a; | 78 | int a; |
@@ -89,9 +90,10 @@ int dmi_available; | |||
89 | /* | 90 | /* |
90 | * Save a DMI string | 91 | * Save a DMI string |
91 | */ | 92 | */ |
92 | static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string) | 93 | static void __init dmi_save_ident(const struct dmi_header *dm, int slot, int string) |
93 | { | 94 | { |
94 | char *p, *d = (char*) dm; | 95 | const char *d = (const char*) dm; |
96 | char *p; | ||
95 | 97 | ||
96 | if (dmi_ident[slot]) | 98 | if (dmi_ident[slot]) |
97 | return; | 99 | return; |
@@ -103,9 +105,9 @@ static void __init dmi_save_ident(struct dmi_header *dm, int slot, int string) | |||
103 | dmi_ident[slot] = p; | 105 | dmi_ident[slot] = p; |
104 | } | 106 | } |
105 | 107 | ||
106 | static void __init dmi_save_uuid(struct dmi_header *dm, int slot, int index) | 108 | static void __init dmi_save_uuid(const struct dmi_header *dm, int slot, int index) |
107 | { | 109 | { |
108 | u8 *d = (u8*) dm + index; | 110 | const u8 *d = (u8*) dm + index; |
109 | char *s; | 111 | char *s; |
110 | int is_ff = 1, is_00 = 1, i; | 112 | int is_ff = 1, is_00 = 1, i; |
111 | 113 | ||
@@ -132,9 +134,9 @@ static void __init dmi_save_uuid(struct dmi_header *dm, int slot, int index) | |||
132 | dmi_ident[slot] = s; | 134 | dmi_ident[slot] = s; |
133 | } | 135 | } |
134 | 136 | ||
135 | static void __init dmi_save_type(struct dmi_header *dm, int slot, int index) | 137 | static void __init dmi_save_type(const struct dmi_header *dm, int slot, int index) |
136 | { | 138 | { |
137 | u8 *d = (u8*) dm + index; | 139 | const u8 *d = (u8*) dm + index; |
138 | char *s; | 140 | char *s; |
139 | 141 | ||
140 | if (dmi_ident[slot]) | 142 | if (dmi_ident[slot]) |
@@ -148,13 +150,13 @@ static void __init dmi_save_type(struct dmi_header *dm, int slot, int index) | |||
148 | dmi_ident[slot] = s; | 150 | dmi_ident[slot] = s; |
149 | } | 151 | } |
150 | 152 | ||
151 | static void __init dmi_save_devices(struct dmi_header *dm) | 153 | static void __init dmi_save_devices(const struct dmi_header *dm) |
152 | { | 154 | { |
153 | int i, count = (dm->length - sizeof(struct dmi_header)) / 2; | 155 | int i, count = (dm->length - sizeof(struct dmi_header)) / 2; |
154 | struct dmi_device *dev; | 156 | struct dmi_device *dev; |
155 | 157 | ||
156 | for (i = 0; i < count; i++) { | 158 | for (i = 0; i < count; i++) { |
157 | char *d = (char *)(dm + 1) + (i * 2); | 159 | const char *d = (char *)(dm + 1) + (i * 2); |
158 | 160 | ||
159 | /* Skip disabled device */ | 161 | /* Skip disabled device */ |
160 | if ((*d & 0x80) == 0) | 162 | if ((*d & 0x80) == 0) |
@@ -173,7 +175,7 @@ static void __init dmi_save_devices(struct dmi_header *dm) | |||
173 | } | 175 | } |
174 | } | 176 | } |
175 | 177 | ||
176 | static void __init dmi_save_oem_strings_devices(struct dmi_header *dm) | 178 | static void __init dmi_save_oem_strings_devices(const struct dmi_header *dm) |
177 | { | 179 | { |
178 | int i, count = *(u8 *)(dm + 1); | 180 | int i, count = *(u8 *)(dm + 1); |
179 | struct dmi_device *dev; | 181 | struct dmi_device *dev; |
@@ -194,7 +196,7 @@ static void __init dmi_save_oem_strings_devices(struct dmi_header *dm) | |||
194 | } | 196 | } |
195 | } | 197 | } |
196 | 198 | ||
197 | static void __init dmi_save_ipmi_device(struct dmi_header *dm) | 199 | static void __init dmi_save_ipmi_device(const struct dmi_header *dm) |
198 | { | 200 | { |
199 | struct dmi_device *dev; | 201 | struct dmi_device *dev; |
200 | void * data; | 202 | void * data; |
@@ -225,7 +227,7 @@ static void __init dmi_save_ipmi_device(struct dmi_header *dm) | |||
225 | * and machine entries. For 2.5 we should pull the smbus controller info | 227 | * and machine entries. For 2.5 we should pull the smbus controller info |
226 | * out of here. | 228 | * out of here. |
227 | */ | 229 | */ |
228 | static void __init dmi_decode(struct dmi_header *dm) | 230 | static void __init dmi_decode(const struct dmi_header *dm) |
229 | { | 231 | { |
230 | switch(dm->type) { | 232 | switch(dm->type) { |
231 | case 0: /* BIOS Information */ | 233 | case 0: /* BIOS Information */ |
@@ -265,9 +267,10 @@ static void __init dmi_decode(struct dmi_header *dm) | |||
265 | } | 267 | } |
266 | } | 268 | } |
267 | 269 | ||
268 | static int __init dmi_present(char __iomem *p) | 270 | static int __init dmi_present(const char __iomem *p) |
269 | { | 271 | { |
270 | u8 buf[15]; | 272 | u8 buf[15]; |
273 | |||
271 | memcpy_fromio(buf, p, 15); | 274 | memcpy_fromio(buf, p, 15); |
272 | if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) { | 275 | if ((memcmp(buf, "_DMI_", 5) == 0) && dmi_checksum(buf)) { |
273 | u16 num = (buf[13] << 8) | buf[12]; | 276 | u16 num = (buf[13] << 8) | buf[12]; |
@@ -348,10 +351,10 @@ void __init dmi_scan_machine(void) | |||
348 | * returns non zero or we hit the end. Callback function is called for | 351 | * returns non zero or we hit the end. Callback function is called for |
349 | * each successful match. Returns the number of matches. | 352 | * each successful match. Returns the number of matches. |
350 | */ | 353 | */ |
351 | int dmi_check_system(struct dmi_system_id *list) | 354 | int dmi_check_system(const struct dmi_system_id *list) |
352 | { | 355 | { |
353 | int i, count = 0; | 356 | int i, count = 0; |
354 | struct dmi_system_id *d = list; | 357 | const struct dmi_system_id *d = list; |
355 | 358 | ||
356 | while (d->ident) { | 359 | while (d->ident) { |
357 | for (i = 0; i < ARRAY_SIZE(d->matches); i++) { | 360 | for (i = 0; i < ARRAY_SIZE(d->matches); i++) { |
@@ -380,7 +383,7 @@ EXPORT_SYMBOL(dmi_check_system); | |||
380 | * Returns one DMI data value, can be used to perform | 383 | * Returns one DMI data value, can be used to perform |
381 | * complex DMI data checks. | 384 | * complex DMI data checks. |
382 | */ | 385 | */ |
383 | char *dmi_get_system_info(int field) | 386 | const char *dmi_get_system_info(int field) |
384 | { | 387 | { |
385 | return dmi_ident[field]; | 388 | return dmi_ident[field]; |
386 | } | 389 | } |
@@ -391,7 +394,7 @@ EXPORT_SYMBOL(dmi_get_system_info); | |||
391 | * dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information. | 394 | * dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information. |
392 | * @str: Case sensitive Name | 395 | * @str: Case sensitive Name |
393 | */ | 396 | */ |
394 | int dmi_name_in_vendors(char *str) | 397 | int dmi_name_in_vendors(const char *str) |
395 | { | 398 | { |
396 | static int fields[] = { DMI_BIOS_VENDOR, DMI_BIOS_VERSION, DMI_SYS_VENDOR, | 399 | static int fields[] = { DMI_BIOS_VENDOR, DMI_BIOS_VERSION, DMI_SYS_VENDOR, |
397 | DMI_PRODUCT_NAME, DMI_PRODUCT_VERSION, DMI_BOARD_VENDOR, | 400 | DMI_PRODUCT_NAME, DMI_PRODUCT_VERSION, DMI_BOARD_VENDOR, |
@@ -418,13 +421,15 @@ EXPORT_SYMBOL(dmi_name_in_vendors); | |||
418 | * A new search is initiated by passing %NULL as the @from argument. | 421 | * A new search is initiated by passing %NULL as the @from argument. |
419 | * If @from is not %NULL, searches continue from next device. | 422 | * If @from is not %NULL, searches continue from next device. |
420 | */ | 423 | */ |
421 | struct dmi_device * dmi_find_device(int type, const char *name, | 424 | const struct dmi_device * dmi_find_device(int type, const char *name, |
422 | struct dmi_device *from) | 425 | const struct dmi_device *from) |
423 | { | 426 | { |
424 | struct list_head *d, *head = from ? &from->list : &dmi_devices; | 427 | const struct list_head *head = from ? &from->list : &dmi_devices; |
428 | struct list_head *d; | ||
425 | 429 | ||
426 | for(d = head->next; d != &dmi_devices; d = d->next) { | 430 | for(d = head->next; d != &dmi_devices; d = d->next) { |
427 | struct dmi_device *dev = list_entry(d, struct dmi_device, list); | 431 | const struct dmi_device *dev = |
432 | list_entry(d, struct dmi_device, list); | ||
428 | 433 | ||
429 | if (((type == DMI_DEV_TYPE_ANY) || (dev->type == type)) && | 434 | if (((type == DMI_DEV_TYPE_ANY) || (dev->type == type)) && |
430 | ((name == NULL) || (strcmp(dev->name, name) == 0))) | 435 | ((name == NULL) || (strcmp(dev->name, name) == 0))) |
@@ -444,7 +449,7 @@ EXPORT_SYMBOL(dmi_find_device); | |||
444 | int dmi_get_year(int field) | 449 | int dmi_get_year(int field) |
445 | { | 450 | { |
446 | int year; | 451 | int year; |
447 | char *s = dmi_get_system_info(field); | 452 | const char *s = dmi_get_system_info(field); |
448 | 453 | ||
449 | if (!s) | 454 | if (!s) |
450 | return -1; | 455 | return -1; |
diff --git a/drivers/hwmon/abituguru.c b/drivers/hwmon/abituguru.c index d575ee958de5..2317f4bb9c92 100644 --- a/drivers/hwmon/abituguru.c +++ b/drivers/hwmon/abituguru.c | |||
@@ -1449,7 +1449,7 @@ static int __init abituguru_init(void) | |||
1449 | struct resource res = { .flags = IORESOURCE_IO }; | 1449 | struct resource res = { .flags = IORESOURCE_IO }; |
1450 | 1450 | ||
1451 | #ifdef CONFIG_DMI | 1451 | #ifdef CONFIG_DMI |
1452 | char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); | 1452 | const char *board_vendor = dmi_get_system_info(DMI_BOARD_VENDOR); |
1453 | 1453 | ||
1454 | /* safety check, refuse to load on non Abit motherboards */ | 1454 | /* safety check, refuse to load on non Abit motherboards */ |
1455 | if (!force && (!board_vendor || | 1455 | if (!force && (!board_vendor || |
diff --git a/drivers/hwmon/applesmc.c b/drivers/hwmon/applesmc.c index 941729a131f5..56213b7f8188 100644 --- a/drivers/hwmon/applesmc.c +++ b/drivers/hwmon/applesmc.c | |||
@@ -1071,7 +1071,7 @@ static const struct attribute_group temperature_attributes_group = | |||
1071 | /* | 1071 | /* |
1072 | * applesmc_dmi_match - found a match. return one, short-circuiting the hunt. | 1072 | * applesmc_dmi_match - found a match. return one, short-circuiting the hunt. |
1073 | */ | 1073 | */ |
1074 | static int applesmc_dmi_match(struct dmi_system_id *id) | 1074 | static int applesmc_dmi_match(const struct dmi_system_id *id) |
1075 | { | 1075 | { |
1076 | int i = 0; | 1076 | int i = 0; |
1077 | struct dmi_match_data* dmi_data = id->driver_data; | 1077 | struct dmi_match_data* dmi_data = id->driver_data; |
diff --git a/drivers/hwmon/hdaps.c b/drivers/hwmon/hdaps.c index e0cf5e6fe5bc..a7c6d407572b 100644 --- a/drivers/hwmon/hdaps.c +++ b/drivers/hwmon/hdaps.c | |||
@@ -480,14 +480,14 @@ static struct attribute_group hdaps_attribute_group = { | |||
480 | /* Module stuff */ | 480 | /* Module stuff */ |
481 | 481 | ||
482 | /* hdaps_dmi_match - found a match. return one, short-circuiting the hunt. */ | 482 | /* hdaps_dmi_match - found a match. return one, short-circuiting the hunt. */ |
483 | static int __init hdaps_dmi_match(struct dmi_system_id *id) | 483 | static int __init hdaps_dmi_match(const struct dmi_system_id *id) |
484 | { | 484 | { |
485 | printk(KERN_INFO "hdaps: %s detected.\n", id->ident); | 485 | printk(KERN_INFO "hdaps: %s detected.\n", id->ident); |
486 | return 1; | 486 | return 1; |
487 | } | 487 | } |
488 | 488 | ||
489 | /* hdaps_dmi_match_invert - found an inverted match. */ | 489 | /* hdaps_dmi_match_invert - found an inverted match. */ |
490 | static int __init hdaps_dmi_match_invert(struct dmi_system_id *id) | 490 | static int __init hdaps_dmi_match_invert(const struct dmi_system_id *id) |
491 | { | 491 | { |
492 | hdaps_invert = 1; | 492 | hdaps_invert = 1; |
493 | printk(KERN_INFO "hdaps: inverting axis readings.\n"); | 493 | printk(KERN_INFO "hdaps: inverting axis readings.\n"); |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 11ecb618007c..20ebe3b7049c 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -588,7 +588,7 @@ out: | |||
588 | * Cable special cases | 588 | * Cable special cases |
589 | */ | 589 | */ |
590 | 590 | ||
591 | static struct dmi_system_id cable_dmi_table[] = { | 591 | static const struct dmi_system_id cable_dmi_table[] = { |
592 | { | 592 | { |
593 | .ident = "HP Pavilion N5430", | 593 | .ident = "HP Pavilion N5430", |
594 | .matches = { | 594 | .matches = { |
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index a7be7795e6af..c10203a32159 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -419,7 +419,7 @@ static unsigned int __devinit init_chipset_via82cxxx(struct pci_dev *dev, const | |||
419 | * Cable special cases | 419 | * Cable special cases |
420 | */ | 420 | */ |
421 | 421 | ||
422 | static struct dmi_system_id cable_dmi_table[] = { | 422 | static const struct dmi_system_id cable_dmi_table[] = { |
423 | { | 423 | { |
424 | .ident = "Acer Ferrari 3400", | 424 | .ident = "Acer Ferrari 3400", |
425 | .matches = { | 425 | .matches = { |
diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c index 60121f10f8d9..b438d998625c 100644 --- a/drivers/input/misc/wistron_btns.c +++ b/drivers/input/misc/wistron_btns.c | |||
@@ -247,7 +247,7 @@ static int have_wifi; | |||
247 | static int have_bluetooth; | 247 | static int have_bluetooth; |
248 | static int have_leds; | 248 | static int have_leds; |
249 | 249 | ||
250 | static int __init dmi_matched(struct dmi_system_id *dmi) | 250 | static int __init dmi_matched(const struct dmi_system_id *dmi) |
251 | { | 251 | { |
252 | const struct key_entry *key; | 252 | const struct key_entry *key; |
253 | 253 | ||
diff --git a/drivers/input/mouse/lifebook.c b/drivers/input/mouse/lifebook.c index 91109b49fde1..608674d0be8b 100644 --- a/drivers/input/mouse/lifebook.c +++ b/drivers/input/mouse/lifebook.c | |||
@@ -27,7 +27,7 @@ struct lifebook_data { | |||
27 | 27 | ||
28 | static const char *desired_serio_phys; | 28 | static const char *desired_serio_phys; |
29 | 29 | ||
30 | static int lifebook_set_serio_phys(struct dmi_system_id *d) | 30 | static int lifebook_set_serio_phys(const struct dmi_system_id *d) |
31 | { | 31 | { |
32 | desired_serio_phys = d->driver_data; | 32 | desired_serio_phys = d->driver_data; |
33 | return 0; | 33 | return 0; |
@@ -35,13 +35,13 @@ static int lifebook_set_serio_phys(struct dmi_system_id *d) | |||
35 | 35 | ||
36 | static unsigned char lifebook_use_6byte_proto; | 36 | static unsigned char lifebook_use_6byte_proto; |
37 | 37 | ||
38 | static int lifebook_set_6byte_proto(struct dmi_system_id *d) | 38 | static int lifebook_set_6byte_proto(const struct dmi_system_id *d) |
39 | { | 39 | { |
40 | lifebook_use_6byte_proto = 1; | 40 | lifebook_use_6byte_proto = 1; |
41 | return 0; | 41 | return 0; |
42 | } | 42 | } |
43 | 43 | ||
44 | static struct dmi_system_id lifebook_dmi_table[] = { | 44 | static const struct dmi_system_id lifebook_dmi_table[] = { |
45 | { | 45 | { |
46 | .ident = "FLORA-ie 55mi", | 46 | .ident = "FLORA-ie 55mi", |
47 | .matches = { | 47 | .matches = { |
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c index 666ad3a53fdb..d349c4a5e3e8 100644 --- a/drivers/input/mouse/synaptics.c +++ b/drivers/input/mouse/synaptics.c | |||
@@ -602,7 +602,7 @@ static int synaptics_reconnect(struct psmouse *psmouse) | |||
602 | 602 | ||
603 | #if defined(__i386__) | 603 | #if defined(__i386__) |
604 | #include <linux/dmi.h> | 604 | #include <linux/dmi.h> |
605 | static struct dmi_system_id toshiba_dmi_table[] = { | 605 | static const struct dmi_system_id toshiba_dmi_table[] = { |
606 | { | 606 | { |
607 | .ident = "Toshiba Satellite", | 607 | .ident = "Toshiba Satellite", |
608 | .matches = { | 608 | .matches = { |
diff --git a/drivers/misc/msi-laptop.c b/drivers/misc/msi-laptop.c index 349be934db7c..83679c762925 100644 --- a/drivers/misc/msi-laptop.c +++ b/drivers/misc/msi-laptop.c | |||
@@ -283,7 +283,7 @@ static struct platform_device *msipf_device; | |||
283 | 283 | ||
284 | /* Initialization */ | 284 | /* Initialization */ |
285 | 285 | ||
286 | static int dmi_check_cb(struct dmi_system_id *id) | 286 | static int dmi_check_cb(const struct dmi_system_id *id) |
287 | { | 287 | { |
288 | printk("msi-laptop: Identified laptop model '%s'.\n", id->ident); | 288 | printk("msi-laptop: Identified laptop model '%s'.\n", id->ident); |
289 | return 0; | 289 | return 0; |
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index d38ddce592c0..e73a71f04bb4 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -807,7 +807,7 @@ static struct sony_nc_event *sony_nc_events; | |||
807 | /* Vaio C* --maybe also FE*, N* and AR* ?-- special init sequence | 807 | /* Vaio C* --maybe also FE*, N* and AR* ?-- special init sequence |
808 | * for Fn keys | 808 | * for Fn keys |
809 | */ | 809 | */ |
810 | static int sony_nc_C_enable(struct dmi_system_id *id) | 810 | static int sony_nc_C_enable(const struct dmi_system_id *id) |
811 | { | 811 | { |
812 | int result = 0; | 812 | int result = 0; |
813 | 813 | ||
@@ -845,7 +845,7 @@ static struct sony_nc_event sony_C_events[] = { | |||
845 | }; | 845 | }; |
846 | 846 | ||
847 | /* SNC-only model map */ | 847 | /* SNC-only model map */ |
848 | static struct dmi_system_id sony_nc_ids[] = { | 848 | static const struct dmi_system_id sony_nc_ids[] = { |
849 | { | 849 | { |
850 | .ident = "Sony Vaio FE Series", | 850 | .ident = "Sony Vaio FE Series", |
851 | .callback = sony_nc_C_enable, | 851 | .callback = sony_nc_C_enable, |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 0222bbaf7b76..6c0b2f0a51ab 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -4448,7 +4448,7 @@ static void ibm_exit(struct ibm_struct *ibm) | |||
4448 | 4448 | ||
4449 | static void __init get_thinkpad_model_data(struct thinkpad_id_data *tp) | 4449 | static void __init get_thinkpad_model_data(struct thinkpad_id_data *tp) |
4450 | { | 4450 | { |
4451 | struct dmi_device *dev = NULL; | 4451 | const struct dmi_device *dev = NULL; |
4452 | char ec_fw_string[18]; | 4452 | char ec_fw_string[18]; |
4453 | 4453 | ||
4454 | if (!tp) | 4454 | if (!tp) |
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c index 0691f473e9d4..4e9fd37cff35 100644 --- a/drivers/pnp/pnpbios/core.c +++ b/drivers/pnp/pnpbios/core.c | |||
@@ -500,7 +500,7 @@ static int __init pnpbios_probe_system(void) | |||
500 | return 0; | 500 | return 0; |
501 | } | 501 | } |
502 | 502 | ||
503 | static int __init exploding_pnp_bios(struct dmi_system_id *d) | 503 | static int __init exploding_pnp_bios(const struct dmi_system_id *d) |
504 | { | 504 | { |
505 | printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident); | 505 | printk(KERN_WARNING "%s detected. Disabling PnPBIOS\n", d->ident); |
506 | return 0; | 506 | return 0; |
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c index 805e5fc5f5db..4db17f75f4f1 100644 --- a/drivers/usb/host/uhci-hcd.c +++ b/drivers/usb/host/uhci-hcd.c | |||
@@ -237,7 +237,7 @@ static int resume_detect_interrupts_are_broken(struct uhci_hcd *uhci) | |||
237 | static int remote_wakeup_is_broken(struct uhci_hcd *uhci) | 237 | static int remote_wakeup_is_broken(struct uhci_hcd *uhci) |
238 | { | 238 | { |
239 | int port; | 239 | int port; |
240 | char *sys_info; | 240 | const char *sys_info; |
241 | static char bad_Asus_board[] = "A7V8X"; | 241 | static char bad_Asus_board[] = "A7V8X"; |
242 | 242 | ||
243 | /* One of Asus's motherboards has a bug which causes it to | 243 | /* One of Asus's motherboards has a bug which causes it to |
diff --git a/drivers/video/imacfb.c b/drivers/video/imacfb.c index 18ea4a549105..6455fd2a39f2 100644 --- a/drivers/video/imacfb.c +++ b/drivers/video/imacfb.c | |||
@@ -58,7 +58,7 @@ static int model = M_UNKNOWN; | |||
58 | static int manual_height; | 58 | static int manual_height; |
59 | static int manual_width; | 59 | static int manual_width; |
60 | 60 | ||
61 | static int set_system(struct dmi_system_id *id) | 61 | static int set_system(const struct dmi_system_id *id) |
62 | { | 62 | { |
63 | printk(KERN_INFO "imacfb: %s detected - set system to %ld\n", | 63 | printk(KERN_INFO "imacfb: %s detected - set system to %ld\n", |
64 | id->ident, (long)id->driver_data); | 64 | id->ident, (long)id->driver_data); |
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index b8ac7b01c45e..00fc7a9c35ec 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -54,7 +54,7 @@ struct dmi_strmatch { | |||
54 | }; | 54 | }; |
55 | 55 | ||
56 | struct dmi_system_id { | 56 | struct dmi_system_id { |
57 | int (*callback)(struct dmi_system_id *); | 57 | int (*callback)(const struct dmi_system_id *); |
58 | const char *ident; | 58 | const char *ident; |
59 | struct dmi_strmatch matches[4]; | 59 | struct dmi_strmatch matches[4]; |
60 | void *driver_data; | 60 | void *driver_data; |
@@ -71,22 +71,22 @@ struct dmi_device { | |||
71 | 71 | ||
72 | #ifdef CONFIG_DMI | 72 | #ifdef CONFIG_DMI |
73 | 73 | ||
74 | extern int dmi_check_system(struct dmi_system_id *list); | 74 | extern int dmi_check_system(const struct dmi_system_id *list); |
75 | extern char * dmi_get_system_info(int field); | 75 | extern const char * dmi_get_system_info(int field); |
76 | extern struct dmi_device * dmi_find_device(int type, const char *name, | 76 | extern const struct dmi_device * dmi_find_device(int type, const char *name, |
77 | struct dmi_device *from); | 77 | const struct dmi_device *from); |
78 | extern void dmi_scan_machine(void); | 78 | extern void dmi_scan_machine(void); |
79 | extern int dmi_get_year(int field); | 79 | extern int dmi_get_year(int field); |
80 | extern int dmi_name_in_vendors(char *str); | 80 | extern int dmi_name_in_vendors(const char *str); |
81 | 81 | ||
82 | #else | 82 | #else |
83 | 83 | ||
84 | static inline int dmi_check_system(struct dmi_system_id *list) { return 0; } | 84 | static inline int dmi_check_system(const struct dmi_system_id *list) { return 0; } |
85 | static inline char * dmi_get_system_info(int field) { return NULL; } | 85 | static inline const char * dmi_get_system_info(int field) { return NULL; } |
86 | static inline struct dmi_device * dmi_find_device(int type, const char *name, | 86 | static inline const struct dmi_device * dmi_find_device(int type, const char *name, |
87 | struct dmi_device *from) { return NULL; } | 87 | const struct dmi_device *from) { return NULL; } |
88 | static inline int dmi_get_year(int year) { return 0; } | 88 | static inline int dmi_get_year(int year) { return 0; } |
89 | static inline int dmi_name_in_vendors(char *s) { return 0; } | 89 | static inline int dmi_name_in_vendors(const char *s) { return 0; } |
90 | 90 | ||
91 | #endif | 91 | #endif |
92 | 92 | ||