diff options
| -rw-r--r-- | drivers/acpi/Kconfig | 19 | ||||
| -rw-r--r-- | drivers/acpi/bus.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/button.c | 1 | ||||
| -rw-r--r-- | drivers/acpi/osl.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/pci_root.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/processor_core.c | 9 | ||||
| -rw-r--r-- | drivers/acpi/scan.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/sleep/main.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/system.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/toshiba_acpi.c | 7 | ||||
| -rw-r--r-- | drivers/acpi/utilities/utdebug.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/utils.c | 6 | ||||
| -rw-r--r-- | drivers/acpi/video.c | 2 | ||||
| -rw-r--r-- | drivers/misc/acer-wmi.c | 6 | ||||
| -rw-r--r-- | drivers/pci/pci-acpi.c | 24 |
15 files changed, 55 insertions, 33 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index f688c214be0c..fbcaa069be86 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
| @@ -283,24 +283,23 @@ config ACPI_TOSHIBA | |||
| 283 | If you have a legacy free Toshiba laptop (such as the Libretto L1 | 283 | If you have a legacy free Toshiba laptop (such as the Libretto L1 |
| 284 | series), say Y. | 284 | series), say Y. |
| 285 | 285 | ||
| 286 | config ACPI_CUSTOM_DSDT | 286 | config ACPI_CUSTOM_DSDT_FILE |
| 287 | bool "Include Custom DSDT" | 287 | string "Custom DSDT Table file to include" |
| 288 | default "" | ||
| 288 | depends on !STANDALONE | 289 | depends on !STANDALONE |
| 289 | default n | ||
| 290 | help | 290 | help |
| 291 | This option supports a custom DSDT by linking it into the kernel. | 291 | This option supports a custom DSDT by linking it into the kernel. |
| 292 | See Documentation/acpi/dsdt-override.txt | 292 | See Documentation/acpi/dsdt-override.txt |
| 293 | 293 | ||
| 294 | If unsure, say N. | ||
| 295 | |||
| 296 | config ACPI_CUSTOM_DSDT_FILE | ||
| 297 | string "Custom DSDT Table file to include" | ||
| 298 | depends on ACPI_CUSTOM_DSDT | ||
| 299 | default "" | ||
| 300 | help | ||
| 301 | Enter the full path name to the file which includes the AmlCode | 294 | Enter the full path name to the file which includes the AmlCode |
| 302 | declaration. | 295 | declaration. |
| 303 | 296 | ||
| 297 | If unsure, don't enter a file name. | ||
| 298 | |||
| 299 | config ACPI_CUSTOM_DSDT | ||
| 300 | bool | ||
| 301 | default ACPI_CUSTOM_DSDT_FILE != "" | ||
| 302 | |||
| 304 | config ACPI_CUSTOM_DSDT_INITRD | 303 | config ACPI_CUSTOM_DSDT_INITRD |
| 305 | bool "Read Custom DSDT from initramfs" | 304 | bool "Read Custom DSDT from initramfs" |
| 306 | depends on BLK_DEV_INITRD | 305 | depends on BLK_DEV_INITRD |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index ce3c0a2cbac4..5b6760e0f957 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
| @@ -776,7 +776,7 @@ static int __init acpi_init(void) | |||
| 776 | 776 | ||
| 777 | acpi_kobj = kobject_create_and_add("acpi", firmware_kobj); | 777 | acpi_kobj = kobject_create_and_add("acpi", firmware_kobj); |
| 778 | if (!acpi_kobj) { | 778 | if (!acpi_kobj) { |
| 779 | printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__); | 779 | printk(KERN_WARNING "%s: kset create error\n", __func__); |
| 780 | acpi_kobj = NULL; | 780 | acpi_kobj = NULL; |
| 781 | } | 781 | } |
| 782 | 782 | ||
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 24a7865a57cb..6c5da83cdb68 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
| @@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device) | |||
| 449 | input->phys = button->phys; | 449 | input->phys = button->phys; |
| 450 | input->id.bustype = BUS_HOST; | 450 | input->id.bustype = BUS_HOST; |
| 451 | input->id.product = button->type; | 451 | input->id.product = button->type; |
| 452 | input->dev.parent = &device->dev; | ||
| 452 | 453 | ||
| 453 | switch (button->type) { | 454 | switch (button->type) { |
| 454 | case ACPI_BUTTON_TYPE_POWER: | 455 | case ACPI_BUTTON_TYPE_POWER: |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 8edba7b678eb..065819ba87c7 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
| @@ -1237,7 +1237,7 @@ int acpi_check_resource_conflict(struct resource *res) | |||
| 1237 | 1237 | ||
| 1238 | if (clash) { | 1238 | if (clash) { |
| 1239 | if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { | 1239 | if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { |
| 1240 | printk(KERN_INFO "%sACPI: %s resource %s [0x%llx-0x%llx]" | 1240 | printk("%sACPI: %s resource %s [0x%llx-0x%llx]" |
| 1241 | " conflicts with ACPI region %s" | 1241 | " conflicts with ACPI region %s" |
| 1242 | " [0x%llx-0x%llx]\n", | 1242 | " [0x%llx-0x%llx]\n", |
| 1243 | acpi_enforce_resources == ENFORCE_RESOURCES_LAX | 1243 | acpi_enforce_resources == ENFORCE_RESOURCES_LAX |
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index f14ff1ffab29..c3fed31166b5 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
| @@ -184,7 +184,7 @@ static void acpi_pci_bridge_scan(struct acpi_device *device) | |||
| 184 | } | 184 | } |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | static int acpi_pci_root_add(struct acpi_device *device) | 187 | static int __devinit acpi_pci_root_add(struct acpi_device *device) |
| 188 | { | 188 | { |
| 189 | int result = 0; | 189 | int result = 0; |
| 190 | struct acpi_pci_root *root = NULL; | 190 | struct acpi_pci_root *root = NULL; |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index d9316ab66347..36a68fa114e3 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
| @@ -888,8 +888,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) | |||
| 888 | return 0; | 888 | return 0; |
| 889 | } | 889 | } |
| 890 | 890 | ||
| 891 | static void | 891 | static void __ref acpi_processor_hotplug_notify(acpi_handle handle, |
| 892 | acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | 892 | u32 event, void *data) |
| 893 | { | 893 | { |
| 894 | struct acpi_processor *pr; | 894 | struct acpi_processor *pr; |
| 895 | struct acpi_device *device = NULL; | 895 | struct acpi_device *device = NULL; |
| @@ -899,9 +899,10 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
| 899 | switch (event) { | 899 | switch (event) { |
| 900 | case ACPI_NOTIFY_BUS_CHECK: | 900 | case ACPI_NOTIFY_BUS_CHECK: |
| 901 | case ACPI_NOTIFY_DEVICE_CHECK: | 901 | case ACPI_NOTIFY_DEVICE_CHECK: |
| 902 | printk("Processor driver received %s event\n", | 902 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
| 903 | "Processor driver received %s event\n", | ||
| 903 | (event == ACPI_NOTIFY_BUS_CHECK) ? | 904 | (event == ACPI_NOTIFY_BUS_CHECK) ? |
| 904 | "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK"); | 905 | "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK")); |
| 905 | 906 | ||
| 906 | if (!is_processor_present(handle)) | 907 | if (!is_processor_present(handle)) |
| 907 | break; | 908 | break; |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 3fac011f9cf9..b26e3019e1cc 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
| @@ -966,7 +966,7 @@ static void acpi_device_set_id(struct acpi_device *device, | |||
| 966 | case ACPI_BUS_TYPE_DEVICE: | 966 | case ACPI_BUS_TYPE_DEVICE: |
| 967 | status = acpi_get_object_info(handle, &buffer); | 967 | status = acpi_get_object_info(handle, &buffer); |
| 968 | if (ACPI_FAILURE(status)) { | 968 | if (ACPI_FAILURE(status)) { |
| 969 | printk(KERN_ERR PREFIX "%s: Error reading device info\n", __FUNCTION__); | 969 | printk(KERN_ERR PREFIX "%s: Error reading device info\n", __func__); |
| 970 | return; | 970 | return; |
| 971 | } | 971 | } |
| 972 | 972 | ||
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 293a1cbb47c0..d2f71a54726c 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
| @@ -504,7 +504,7 @@ static void acpi_power_off_prepare(void) | |||
| 504 | static void acpi_power_off(void) | 504 | static void acpi_power_off(void) |
| 505 | { | 505 | { |
| 506 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ | 506 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ |
| 507 | printk("%s called\n", __FUNCTION__); | 507 | printk("%s called\n", __func__); |
| 508 | local_irq_disable(); | 508 | local_irq_disable(); |
| 509 | acpi_enable_wakeup_device(ACPI_STATE_S5); | 509 | acpi_enable_wakeup_device(ACPI_STATE_S5); |
| 510 | acpi_enter_sleep_state(ACPI_STATE_S5); | 510 | acpi_enter_sleep_state(ACPI_STATE_S5); |
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index 55cf4c05bb74..4749f379a915 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c | |||
| @@ -319,7 +319,7 @@ void acpi_irq_stats_init(void) | |||
| 319 | goto fail; | 319 | goto fail; |
| 320 | 320 | ||
| 321 | for (i = 0; i < num_counters; ++i) { | 321 | for (i = 0; i < num_counters; ++i) { |
| 322 | char buffer[10]; | 322 | char buffer[12]; |
| 323 | char *name; | 323 | char *name; |
| 324 | 324 | ||
| 325 | if (i < num_gpes) | 325 | if (i < num_gpes) |
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index 9e8c20c6a0b7..0a43c8e0eff3 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c | |||
| @@ -99,6 +99,13 @@ MODULE_LICENSE("GPL"); | |||
| 99 | #define HCI_VIDEO_OUT_CRT 0x2 | 99 | #define HCI_VIDEO_OUT_CRT 0x2 |
| 100 | #define HCI_VIDEO_OUT_TV 0x4 | 100 | #define HCI_VIDEO_OUT_TV 0x4 |
| 101 | 101 | ||
| 102 | static const struct acpi_device_id toshiba_device_ids[] = { | ||
| 103 | {"TOS6200", 0}, | ||
| 104 | {"TOS1900", 0}, | ||
| 105 | {"", 0}, | ||
| 106 | }; | ||
| 107 | MODULE_DEVICE_TABLE(acpi, toshiba_device_ids); | ||
| 108 | |||
| 102 | /* utility | 109 | /* utility |
| 103 | */ | 110 | */ |
| 104 | 111 | ||
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index c7e128e5369b..7361204b1eef 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c | |||
| @@ -109,7 +109,7 @@ void acpi_ut_track_stack_ptr(void) | |||
| 109 | * RETURN: Updated pointer to the function name | 109 | * RETURN: Updated pointer to the function name |
| 110 | * | 110 | * |
| 111 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. | 111 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. |
| 112 | * This allows compiler macros such as __FUNCTION__ to be used | 112 | * This allows compiler macros such as __func__ to be used |
| 113 | * with no change to the debug output. | 113 | * with no change to the debug output. |
| 114 | * | 114 | * |
| 115 | ******************************************************************************/ | 115 | ******************************************************************************/ |
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index eba55b7d6c95..44ea60cf21c0 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c | |||
| @@ -407,6 +407,12 @@ acpi_evaluate_reference(acpi_handle handle, | |||
| 407 | break; | 407 | break; |
| 408 | } | 408 | } |
| 409 | 409 | ||
| 410 | if (!element->reference.handle) { | ||
| 411 | printk(KERN_WARNING PREFIX "Invalid reference in" | ||
| 412 | " package %s\n", pathname); | ||
| 413 | status = AE_NULL_ENTRY; | ||
| 414 | break; | ||
| 415 | } | ||
| 410 | /* Get the acpi_handle. */ | 416 | /* Get the acpi_handle. */ |
| 411 | 417 | ||
| 412 | list->handles[i] = element->reference.handle; | 418 | list->handles[i] = element->reference.handle; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index ace958cb3894..1bc0c74f2755 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
| @@ -1201,7 +1201,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset) | |||
| 1201 | if (!video) | 1201 | if (!video) |
| 1202 | goto end; | 1202 | goto end; |
| 1203 | 1203 | ||
| 1204 | printk(KERN_INFO PREFIX "Please implement %s\n", __FUNCTION__); | 1204 | printk(KERN_INFO PREFIX "Please implement %s\n", __func__); |
| 1205 | seq_printf(seq, "<TODO>\n"); | 1205 | seq_printf(seq, "<TODO>\n"); |
| 1206 | 1206 | ||
| 1207 | end: | 1207 | end: |
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c index 74d12b4a3abd..cf71e312b5cb 100644 --- a/drivers/misc/acer-wmi.c +++ b/drivers/misc/acer-wmi.c | |||
| @@ -765,7 +765,7 @@ static struct led_classdev mail_led = { | |||
| 765 | .brightness_set = mail_led_set, | 765 | .brightness_set = mail_led_set, |
| 766 | }; | 766 | }; |
| 767 | 767 | ||
| 768 | static int __init acer_led_init(struct device *dev) | 768 | static int __devinit acer_led_init(struct device *dev) |
| 769 | { | 769 | { |
| 770 | return led_classdev_register(dev, &mail_led); | 770 | return led_classdev_register(dev, &mail_led); |
| 771 | } | 771 | } |
| @@ -798,7 +798,7 @@ static struct backlight_ops acer_bl_ops = { | |||
| 798 | .update_status = update_bl_status, | 798 | .update_status = update_bl_status, |
| 799 | }; | 799 | }; |
| 800 | 800 | ||
| 801 | static int __init acer_backlight_init(struct device *dev) | 801 | static int __devinit acer_backlight_init(struct device *dev) |
| 802 | { | 802 | { |
| 803 | struct backlight_device *bd; | 803 | struct backlight_device *bd; |
| 804 | 804 | ||
| @@ -817,7 +817,7 @@ static int __init acer_backlight_init(struct device *dev) | |||
| 817 | return 0; | 817 | return 0; |
| 818 | } | 818 | } |
| 819 | 819 | ||
| 820 | static void __exit acer_backlight_exit(void) | 820 | static void acer_backlight_exit(void) |
| 821 | { | 821 | { |
| 822 | backlight_device_unregister(acer_backlight_device); | 822 | backlight_device_unregister(acer_backlight_device); |
| 823 | } | 823 | } |
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 4a23654184fc..72f7476930c8 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
| @@ -272,21 +272,29 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
| 272 | { | 272 | { |
| 273 | acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev); | 273 | acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev); |
| 274 | acpi_handle tmp; | 274 | acpi_handle tmp; |
| 275 | static int state_conv[] = { | 275 | static const u8 state_conv[] = { |
| 276 | [0] = 0, | 276 | [PCI_D0] = ACPI_STATE_D0, |
| 277 | [1] = 1, | 277 | [PCI_D1] = ACPI_STATE_D1, |
| 278 | [2] = 2, | 278 | [PCI_D2] = ACPI_STATE_D2, |
| 279 | [3] = 3, | 279 | [PCI_D3hot] = ACPI_STATE_D3, |
| 280 | [4] = 3 | 280 | [PCI_D3cold] = ACPI_STATE_D3 |
| 281 | }; | 281 | }; |
| 282 | int acpi_state = state_conv[(int __force) state]; | ||
| 283 | 282 | ||
| 284 | if (!handle) | 283 | if (!handle) |
| 285 | return -ENODEV; | 284 | return -ENODEV; |
| 286 | /* If the ACPI device has _EJ0, ignore the device */ | 285 | /* If the ACPI device has _EJ0, ignore the device */ |
| 287 | if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp))) | 286 | if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp))) |
| 288 | return 0; | 287 | return 0; |
| 289 | return acpi_bus_set_power(handle, acpi_state); | 288 | |
| 289 | switch (state) { | ||
| 290 | case PCI_D0: | ||
| 291 | case PCI_D1: | ||
| 292 | case PCI_D2: | ||
| 293 | case PCI_D3hot: | ||
| 294 | case PCI_D3cold: | ||
| 295 | return acpi_bus_set_power(handle, state_conv[state]); | ||
| 296 | } | ||
| 297 | return -EINVAL; | ||
| 290 | } | 298 | } |
| 291 | 299 | ||
| 292 | 300 | ||
