diff options
-rw-r--r-- | arch/x86/kernel/acpi/boot.c | 22 | ||||
-rw-r--r-- | drivers/acpi/pci_link.c | 2 | ||||
-rw-r--r-- | drivers/acpi/pci_root.c | 2 | ||||
-rw-r--r-- | drivers/acpi/power.c | 2 | ||||
-rw-r--r-- | drivers/acpi/power_meter.c | 4 | ||||
-rw-r--r-- | drivers/acpi/processor_pdc.c | 2 | ||||
-rw-r--r-- | drivers/acpi/processor_thermal.c | 3 | ||||
-rw-r--r-- | drivers/acpi/sbs.c | 3 | ||||
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 9 | ||||
-rw-r--r-- | include/linux/acpi.h | 6 |
10 files changed, 25 insertions, 30 deletions
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index fb1035cd9a6a..036d28adf59d 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -1529,16 +1529,10 @@ static struct dmi_system_id __initdata acpi_dmi_table_late[] = { | |||
1529 | * if acpi_blacklisted() acpi_disabled = 1; | 1529 | * if acpi_blacklisted() acpi_disabled = 1; |
1530 | * acpi_irq_model=... | 1530 | * acpi_irq_model=... |
1531 | * ... | 1531 | * ... |
1532 | * | ||
1533 | * return value: (currently ignored) | ||
1534 | * 0: success | ||
1535 | * !0: failure | ||
1536 | */ | 1532 | */ |
1537 | 1533 | ||
1538 | int __init acpi_boot_table_init(void) | 1534 | void __init acpi_boot_table_init(void) |
1539 | { | 1535 | { |
1540 | int error; | ||
1541 | |||
1542 | dmi_check_system(acpi_dmi_table); | 1536 | dmi_check_system(acpi_dmi_table); |
1543 | 1537 | ||
1544 | /* | 1538 | /* |
@@ -1546,15 +1540,14 @@ int __init acpi_boot_table_init(void) | |||
1546 | * One exception: acpi=ht continues far enough to enumerate LAPICs | 1540 | * One exception: acpi=ht continues far enough to enumerate LAPICs |
1547 | */ | 1541 | */ |
1548 | if (acpi_disabled && !acpi_ht) | 1542 | if (acpi_disabled && !acpi_ht) |
1549 | return 1; | 1543 | return; |
1550 | 1544 | ||
1551 | /* | 1545 | /* |
1552 | * Initialize the ACPI boot-time table parser. | 1546 | * Initialize the ACPI boot-time table parser. |
1553 | */ | 1547 | */ |
1554 | error = acpi_table_init(); | 1548 | if (acpi_table_init()) { |
1555 | if (error) { | ||
1556 | disable_acpi(); | 1549 | disable_acpi(); |
1557 | return error; | 1550 | return; |
1558 | } | 1551 | } |
1559 | 1552 | ||
1560 | acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); | 1553 | acpi_table_parse(ACPI_SIG_BOOT, acpi_parse_sbf); |
@@ -1562,18 +1555,15 @@ int __init acpi_boot_table_init(void) | |||
1562 | /* | 1555 | /* |
1563 | * blacklist may disable ACPI entirely | 1556 | * blacklist may disable ACPI entirely |
1564 | */ | 1557 | */ |
1565 | error = acpi_blacklisted(); | 1558 | if (acpi_blacklisted()) { |
1566 | if (error) { | ||
1567 | if (acpi_force) { | 1559 | if (acpi_force) { |
1568 | printk(KERN_WARNING PREFIX "acpi=force override\n"); | 1560 | printk(KERN_WARNING PREFIX "acpi=force override\n"); |
1569 | } else { | 1561 | } else { |
1570 | printk(KERN_WARNING PREFIX "Disabling ACPI support\n"); | 1562 | printk(KERN_WARNING PREFIX "Disabling ACPI support\n"); |
1571 | disable_acpi(); | 1563 | disable_acpi(); |
1572 | return error; | 1564 | return; |
1573 | } | 1565 | } |
1574 | } | 1566 | } |
1575 | |||
1576 | return 0; | ||
1577 | } | 1567 | } |
1578 | 1568 | ||
1579 | int __init early_acpi_boot_init(void) | 1569 | int __init early_acpi_boot_init(void) |
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index 394ae89409c2..04b0f007c9b7 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -56,7 +56,7 @@ ACPI_MODULE_NAME("pci_link"); | |||
56 | static int acpi_pci_link_add(struct acpi_device *device); | 56 | static int acpi_pci_link_add(struct acpi_device *device); |
57 | static int acpi_pci_link_remove(struct acpi_device *device, int type); | 57 | static int acpi_pci_link_remove(struct acpi_device *device, int type); |
58 | 58 | ||
59 | static struct acpi_device_id link_device_ids[] = { | 59 | static const struct acpi_device_id link_device_ids[] = { |
60 | {"PNP0C0F", 0}, | 60 | {"PNP0C0F", 0}, |
61 | {"", 0}, | 61 | {"", 0}, |
62 | }; | 62 | }; |
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 101cce3681d1..64f55b6db73c 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -46,7 +46,7 @@ static int acpi_pci_root_add(struct acpi_device *device); | |||
46 | static int acpi_pci_root_remove(struct acpi_device *device, int type); | 46 | static int acpi_pci_root_remove(struct acpi_device *device, int type); |
47 | static int acpi_pci_root_start(struct acpi_device *device); | 47 | static int acpi_pci_root_start(struct acpi_device *device); |
48 | 48 | ||
49 | static struct acpi_device_id root_device_ids[] = { | 49 | static const struct acpi_device_id root_device_ids[] = { |
50 | {"PNP0A03", 0}, | 50 | {"PNP0A03", 0}, |
51 | {"", 0}, | 51 | {"", 0}, |
52 | }; | 52 | }; |
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 22b297916519..0f30c3c1eea4 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
@@ -65,7 +65,7 @@ static int acpi_power_remove(struct acpi_device *device, int type); | |||
65 | static int acpi_power_resume(struct acpi_device *device); | 65 | static int acpi_power_resume(struct acpi_device *device); |
66 | static int acpi_power_open_fs(struct inode *inode, struct file *file); | 66 | static int acpi_power_open_fs(struct inode *inode, struct file *file); |
67 | 67 | ||
68 | static struct acpi_device_id power_device_ids[] = { | 68 | static const struct acpi_device_id power_device_ids[] = { |
69 | {ACPI_POWER_HID, 0}, | 69 | {ACPI_POWER_HID, 0}, |
70 | {"", 0}, | 70 | {"", 0}, |
71 | }; | 71 | }; |
diff --git a/drivers/acpi/power_meter.c b/drivers/acpi/power_meter.c index 2ef7030a0c28..dc4ffadf8122 100644 --- a/drivers/acpi/power_meter.c +++ b/drivers/acpi/power_meter.c | |||
@@ -64,7 +64,7 @@ static int can_cap_in_hardware(void) | |||
64 | return force_cap_on || cap_in_hardware; | 64 | return force_cap_on || cap_in_hardware; |
65 | } | 65 | } |
66 | 66 | ||
67 | static struct acpi_device_id power_meter_ids[] = { | 67 | static const struct acpi_device_id power_meter_ids[] = { |
68 | {"ACPI000D", 0}, | 68 | {"ACPI000D", 0}, |
69 | {"", 0}, | 69 | {"", 0}, |
70 | }; | 70 | }; |
@@ -534,6 +534,7 @@ static void remove_domain_devices(struct acpi_power_meter_resource *resource) | |||
534 | 534 | ||
535 | kfree(resource->domain_devices); | 535 | kfree(resource->domain_devices); |
536 | kobject_put(resource->holders_dir); | 536 | kobject_put(resource->holders_dir); |
537 | resource->num_domain_devices = 0; | ||
537 | } | 538 | } |
538 | 539 | ||
539 | static int read_domain_devices(struct acpi_power_meter_resource *resource) | 540 | static int read_domain_devices(struct acpi_power_meter_resource *resource) |
@@ -740,7 +741,6 @@ skip_unsafe_cap: | |||
740 | 741 | ||
741 | return res; | 742 | return res; |
742 | error: | 743 | error: |
743 | remove_domain_devices(resource); | ||
744 | remove_attrs(resource); | 744 | remove_attrs(resource); |
745 | return res; | 745 | return res; |
746 | } | 746 | } |
diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c index 30e4dc0cdf30..7d4ee394d0b3 100644 --- a/drivers/acpi/processor_pdc.c +++ b/drivers/acpi/processor_pdc.c | |||
@@ -151,7 +151,7 @@ early_init_pdc(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
151 | return AE_OK; | 151 | return AE_OK; |
152 | } | 152 | } |
153 | 153 | ||
154 | void acpi_early_processor_set_pdc(void) | 154 | void __init acpi_early_processor_set_pdc(void) |
155 | { | 155 | { |
156 | /* | 156 | /* |
157 | * Check whether the system is DMI table. If yes, OSPM | 157 | * Check whether the system is DMI table. If yes, OSPM |
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index 140c5c5b423c..6deafb4aa0da 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c | |||
@@ -443,8 +443,7 @@ struct thermal_cooling_device_ops processor_cooling_ops = { | |||
443 | #ifdef CONFIG_ACPI_PROCFS | 443 | #ifdef CONFIG_ACPI_PROCFS |
444 | static int acpi_processor_limit_seq_show(struct seq_file *seq, void *offset) | 444 | static int acpi_processor_limit_seq_show(struct seq_file *seq, void *offset) |
445 | { | 445 | { |
446 | struct acpi_processor *pr = (struct acpi_processor *)seq->private; | 446 | struct acpi_processor *pr = seq->private; |
447 | |||
448 | 447 | ||
449 | if (!pr) | 448 | if (!pr) |
450 | goto end; | 449 | goto end; |
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 52b9db8afc20..b16ddbf23a9c 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -822,7 +822,10 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) | |||
822 | 822 | ||
823 | static void acpi_battery_remove(struct acpi_sbs *sbs, int id) | 823 | static void acpi_battery_remove(struct acpi_sbs *sbs, int id) |
824 | { | 824 | { |
825 | #if defined(CONFIG_ACPI_SYSFS_POWER) || defined(CONFIG_ACPI_PROCFS_POWER) | ||
825 | struct acpi_battery *battery = &sbs->battery[id]; | 826 | struct acpi_battery *battery = &sbs->battery[id]; |
827 | #endif | ||
828 | |||
826 | #ifdef CONFIG_ACPI_SYSFS_POWER | 829 | #ifdef CONFIG_ACPI_SYSFS_POWER |
827 | if (battery->bat.dev) { | 830 | if (battery->bat.dev) { |
828 | if (battery->have_sysfs_alarm) | 831 | if (battery->have_sysfs_alarm) |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 5af53340da6f..3f71a605a492 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -1201,9 +1201,12 @@ static void sony_nc_rfkill_setup(struct acpi_device *device) | |||
1201 | /* the buffer is filled with magic numbers describing the devices | 1201 | /* the buffer is filled with magic numbers describing the devices |
1202 | * available, 0xff terminates the enumeration | 1202 | * available, 0xff terminates the enumeration |
1203 | */ | 1203 | */ |
1204 | while ((dev_code = *(device_enum->buffer.pointer + i)) != 0xff && | 1204 | for (i = 0; i < device_enum->buffer.length; i++) { |
1205 | i < device_enum->buffer.length) { | 1205 | |
1206 | i++; | 1206 | dev_code = *(device_enum->buffer.pointer + i); |
1207 | if (dev_code == 0xff) | ||
1208 | break; | ||
1209 | |||
1207 | dprintk("Radio devices, looking at 0x%.2x\n", dev_code); | 1210 | dprintk("Radio devices, looking at 0x%.2x\n", dev_code); |
1208 | 1211 | ||
1209 | if (dev_code == 0 && !sony_rfkill_devices[SONY_WIFI]) | 1212 | if (dev_code == 0 && !sony_rfkill_devices[SONY_WIFI]) |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 36924255c0d5..b926afe8c03e 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -80,7 +80,7 @@ char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | |||
80 | void __acpi_unmap_table(char *map, unsigned long size); | 80 | void __acpi_unmap_table(char *map, unsigned long size); |
81 | int early_acpi_boot_init(void); | 81 | int early_acpi_boot_init(void); |
82 | int acpi_boot_init (void); | 82 | int acpi_boot_init (void); |
83 | int acpi_boot_table_init (void); | 83 | void acpi_boot_table_init (void); |
84 | int acpi_mps_check (void); | 84 | int acpi_mps_check (void); |
85 | int acpi_numa_init (void); | 85 | int acpi_numa_init (void); |
86 | 86 | ||
@@ -321,9 +321,9 @@ static inline int acpi_boot_init(void) | |||
321 | return 0; | 321 | return 0; |
322 | } | 322 | } |
323 | 323 | ||
324 | static inline int acpi_boot_table_init(void) | 324 | static inline void acpi_boot_table_init(void) |
325 | { | 325 | { |
326 | return 0; | 326 | return; |
327 | } | 327 | } |
328 | 328 | ||
329 | static inline int acpi_mps_check(void) | 329 | static inline int acpi_mps_check(void) |