diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-15 18:10:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-10-15 18:10:27 -0400 |
commit | bd72f85b9ad6cf41bc771de0cd27d892c41b4396 (patch) | |
tree | 3fd0909295dd427c4016dd8c09fae0050e007512 /drivers | |
parent | 13e356c977473baeb29e8abfd992f0cd938a78ce (diff) | |
parent | d59733c1e56784a99381799021c4f9698f3e6379 (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6:
ACPI button: don't try to use a non-existent lid device
ACPI: video: Loosen strictness of video bus detection code
eeepc-laptop: Prevent a panic when disabling RT2860 wireless when associated
eeepc-laptop: Properly annote eeepc_enable_camera().
ACPI / PCI: Fix NULL pointer dereference in acpi_get_pci_dev() (rev. 2)
fujitsu-laptop: address missed led-class ifdef fixup
ACPI: Kconfig, fix proc aggregator text
ACPI: add AC/DC notifier
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/Kconfig | 4 | ||||
-rw-r--r-- | drivers/acpi/ac.c | 1 | ||||
-rw-r--r-- | drivers/acpi/button.c | 3 | ||||
-rw-r--r-- | drivers/acpi/pci_root.c | 11 | ||||
-rw-r--r-- | drivers/acpi/video.c | 7 | ||||
-rw-r--r-- | drivers/acpi/video_detect.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/eeepc-laptop.c | 31 | ||||
-rw-r--r-- | drivers/platform/x86/fujitsu-laptop.c | 2 |
8 files changed, 46 insertions, 15 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 0ed42d8870c7..93d2c7971df6 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -218,10 +218,10 @@ config ACPI_PROCESSOR_AGGREGATOR | |||
218 | depends on X86 | 218 | depends on X86 |
219 | help | 219 | help |
220 | ACPI 4.0 defines processor Aggregator, which enables OS to perform | 220 | ACPI 4.0 defines processor Aggregator, which enables OS to perform |
221 | specfic processor configuration and control that applies to all | 221 | specific processor configuration and control that applies to all |
222 | processors in the platform. Currently only logical processor idling | 222 | processors in the platform. Currently only logical processor idling |
223 | is defined, which is to reduce power consumption. This driver | 223 | is defined, which is to reduce power consumption. This driver |
224 | support the new device. | 224 | supports the new device. |
225 | 225 | ||
226 | config ACPI_THERMAL | 226 | config ACPI_THERMAL |
227 | tristate "Thermal Zone" | 227 | tristate "Thermal Zone" |
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 98b9690b0159..b6ed60b57b0d 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
@@ -245,6 +245,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event) | |||
245 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 245 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
246 | dev_name(&device->dev), event, | 246 | dev_name(&device->dev), event, |
247 | (u32) ac->state); | 247 | (u32) ac->state); |
248 | acpi_notifier_call_chain(device, event, (u32) ac->state); | ||
248 | #ifdef CONFIG_ACPI_SYSFS_POWER | 249 | #ifdef CONFIG_ACPI_SYSFS_POWER |
249 | kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); | 250 | kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); |
250 | #endif | 251 | #endif |
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 9335b87c5174..0c9c6a9a002c 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -251,6 +251,9 @@ int acpi_lid_open(void) | |||
251 | acpi_status status; | 251 | acpi_status status; |
252 | unsigned long long state; | 252 | unsigned long long state; |
253 | 253 | ||
254 | if (!lid_device) | ||
255 | return -ENODEV; | ||
256 | |||
254 | status = acpi_evaluate_integer(lid_device->handle, "_LID", NULL, | 257 | status = acpi_evaluate_integer(lid_device->handle, "_LID", NULL, |
255 | &state); | 258 | &state); |
256 | if (ACPI_FAILURE(status)) | 259 | if (ACPI_FAILURE(status)) |
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 31122214e0ec..1af808171d46 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -389,6 +389,17 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle) | |||
389 | 389 | ||
390 | pbus = pdev->subordinate; | 390 | pbus = pdev->subordinate; |
391 | pci_dev_put(pdev); | 391 | pci_dev_put(pdev); |
392 | |||
393 | /* | ||
394 | * This function may be called for a non-PCI device that has a | ||
395 | * PCI parent (eg. a disk under a PCI SATA controller). In that | ||
396 | * case pdev->subordinate will be NULL for the parent. | ||
397 | */ | ||
398 | if (!pbus) { | ||
399 | dev_dbg(&pdev->dev, "Not a PCI-to-PCI bridge\n"); | ||
400 | pdev = NULL; | ||
401 | break; | ||
402 | } | ||
392 | } | 403 | } |
393 | out: | 404 | out: |
394 | list_for_each_entry_safe(node, tmp, &device_list, node) | 405 | list_for_each_entry_safe(node, tmp, &device_list, node) |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index f6e54bf8dd96..64e3c581b7a9 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -1109,7 +1109,12 @@ static int acpi_video_bus_check(struct acpi_video_bus *video) | |||
1109 | */ | 1109 | */ |
1110 | 1110 | ||
1111 | /* Does this device support video switching? */ | 1111 | /* Does this device support video switching? */ |
1112 | if (video->cap._DOS) { | 1112 | if (video->cap._DOS || video->cap._DOD) { |
1113 | if (!video->cap._DOS) { | ||
1114 | printk(KERN_WARNING FW_BUG | ||
1115 | "ACPI(%s) defines _DOD but not _DOS\n", | ||
1116 | acpi_device_bid(video->device)); | ||
1117 | } | ||
1113 | video->flags.multihead = 1; | 1118 | video->flags.multihead = 1; |
1114 | status = 0; | 1119 | status = 0; |
1115 | } | 1120 | } |
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c index 7032f25da9b5..575593a8b4e6 100644 --- a/drivers/acpi/video_detect.c +++ b/drivers/acpi/video_detect.c | |||
@@ -84,7 +84,7 @@ long acpi_is_video_device(struct acpi_device *device) | |||
84 | return 0; | 84 | return 0; |
85 | 85 | ||
86 | /* Does this device able to support video switching ? */ | 86 | /* Does this device able to support video switching ? */ |
87 | if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) && | 87 | if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) || |
88 | ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy))) | 88 | ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy))) |
89 | video_caps |= ACPI_VIDEO_OUTPUT_SWITCHING; | 89 | video_caps |= ACPI_VIDEO_OUTPUT_SWITCHING; |
90 | 90 | ||
diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 749e2102b2be..d379e74a05d0 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c | |||
@@ -150,6 +150,8 @@ struct eeepc_hotk { | |||
150 | /* The actual device the driver binds to */ | 150 | /* The actual device the driver binds to */ |
151 | static struct eeepc_hotk *ehotk; | 151 | static struct eeepc_hotk *ehotk; |
152 | 152 | ||
153 | static void eeepc_rfkill_hotplug(bool real); | ||
154 | |||
153 | /* Platform device/driver */ | 155 | /* Platform device/driver */ |
154 | static int eeepc_hotk_thaw(struct device *device); | 156 | static int eeepc_hotk_thaw(struct device *device); |
155 | static int eeepc_hotk_restore(struct device *device); | 157 | static int eeepc_hotk_restore(struct device *device); |
@@ -343,14 +345,23 @@ static bool eeepc_wlan_rfkill_blocked(void) | |||
343 | static int eeepc_rfkill_set(void *data, bool blocked) | 345 | static int eeepc_rfkill_set(void *data, bool blocked) |
344 | { | 346 | { |
345 | unsigned long asl = (unsigned long)data; | 347 | unsigned long asl = (unsigned long)data; |
346 | return set_acpi(asl, !blocked); | 348 | int ret; |
349 | |||
350 | if (asl != CM_ASL_WLAN) | ||
351 | return set_acpi(asl, !blocked); | ||
352 | |||
353 | /* hack to avoid panic with rt2860sta */ | ||
354 | if (blocked) | ||
355 | eeepc_rfkill_hotplug(false); | ||
356 | ret = set_acpi(asl, !blocked); | ||
357 | return ret; | ||
347 | } | 358 | } |
348 | 359 | ||
349 | static const struct rfkill_ops eeepc_rfkill_ops = { | 360 | static const struct rfkill_ops eeepc_rfkill_ops = { |
350 | .set_block = eeepc_rfkill_set, | 361 | .set_block = eeepc_rfkill_set, |
351 | }; | 362 | }; |
352 | 363 | ||
353 | static void __init eeepc_enable_camera(void) | 364 | static void __devinit eeepc_enable_camera(void) |
354 | { | 365 | { |
355 | /* | 366 | /* |
356 | * If the following call to set_acpi() fails, it's because there's no | 367 | * If the following call to set_acpi() fails, it's because there's no |
@@ -643,13 +654,13 @@ static int eeepc_get_adapter_status(struct hotplug_slot *hotplug_slot, | |||
643 | return 0; | 654 | return 0; |
644 | } | 655 | } |
645 | 656 | ||
646 | static void eeepc_rfkill_hotplug(void) | 657 | static void eeepc_rfkill_hotplug(bool real) |
647 | { | 658 | { |
648 | struct pci_dev *dev; | 659 | struct pci_dev *dev; |
649 | struct pci_bus *bus; | 660 | struct pci_bus *bus; |
650 | bool blocked = eeepc_wlan_rfkill_blocked(); | 661 | bool blocked = real ? eeepc_wlan_rfkill_blocked() : true; |
651 | 662 | ||
652 | if (ehotk->wlan_rfkill) | 663 | if (real && ehotk->wlan_rfkill) |
653 | rfkill_set_sw_state(ehotk->wlan_rfkill, blocked); | 664 | rfkill_set_sw_state(ehotk->wlan_rfkill, blocked); |
654 | 665 | ||
655 | mutex_lock(&ehotk->hotplug_lock); | 666 | mutex_lock(&ehotk->hotplug_lock); |
@@ -692,7 +703,7 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data) | |||
692 | if (event != ACPI_NOTIFY_BUS_CHECK) | 703 | if (event != ACPI_NOTIFY_BUS_CHECK) |
693 | return; | 704 | return; |
694 | 705 | ||
695 | eeepc_rfkill_hotplug(); | 706 | eeepc_rfkill_hotplug(true); |
696 | } | 707 | } |
697 | 708 | ||
698 | static void eeepc_hotk_notify(struct acpi_device *device, u32 event) | 709 | static void eeepc_hotk_notify(struct acpi_device *device, u32 event) |
@@ -850,7 +861,7 @@ static int eeepc_hotk_restore(struct device *device) | |||
850 | { | 861 | { |
851 | /* Refresh both wlan rfkill state and pci hotplug */ | 862 | /* Refresh both wlan rfkill state and pci hotplug */ |
852 | if (ehotk->wlan_rfkill) | 863 | if (ehotk->wlan_rfkill) |
853 | eeepc_rfkill_hotplug(); | 864 | eeepc_rfkill_hotplug(true); |
854 | 865 | ||
855 | if (ehotk->bluetooth_rfkill) | 866 | if (ehotk->bluetooth_rfkill) |
856 | rfkill_set_sw_state(ehotk->bluetooth_rfkill, | 867 | rfkill_set_sw_state(ehotk->bluetooth_rfkill, |
@@ -993,7 +1004,7 @@ static void eeepc_rfkill_exit(void) | |||
993 | * Refresh pci hotplug in case the rfkill state was changed after | 1004 | * Refresh pci hotplug in case the rfkill state was changed after |
994 | * eeepc_unregister_rfkill_notifier() | 1005 | * eeepc_unregister_rfkill_notifier() |
995 | */ | 1006 | */ |
996 | eeepc_rfkill_hotplug(); | 1007 | eeepc_rfkill_hotplug(true); |
997 | if (ehotk->hotplug_slot) | 1008 | if (ehotk->hotplug_slot) |
998 | pci_hp_deregister(ehotk->hotplug_slot); | 1009 | pci_hp_deregister(ehotk->hotplug_slot); |
999 | 1010 | ||
@@ -1109,7 +1120,7 @@ static int eeepc_rfkill_init(struct device *dev) | |||
1109 | * Refresh pci hotplug in case the rfkill state was changed during | 1120 | * Refresh pci hotplug in case the rfkill state was changed during |
1110 | * setup. | 1121 | * setup. |
1111 | */ | 1122 | */ |
1112 | eeepc_rfkill_hotplug(); | 1123 | eeepc_rfkill_hotplug(true); |
1113 | 1124 | ||
1114 | exit: | 1125 | exit: |
1115 | if (result && result != -ENODEV) | 1126 | if (result && result != -ENODEV) |
@@ -1189,7 +1200,7 @@ static int eeepc_input_init(struct device *dev) | |||
1189 | return 0; | 1200 | return 0; |
1190 | } | 1201 | } |
1191 | 1202 | ||
1192 | static int eeepc_hotk_add(struct acpi_device *device) | 1203 | static int __devinit eeepc_hotk_add(struct acpi_device *device) |
1193 | { | 1204 | { |
1194 | struct device *dev; | 1205 | struct device *dev; |
1195 | int result; | 1206 | int result; |
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index f35aee5c2149..bcd4ba8be7db 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c | |||
@@ -944,7 +944,7 @@ static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type) | |||
944 | struct fujitsu_hotkey_t *fujitsu_hotkey = acpi_driver_data(device); | 944 | struct fujitsu_hotkey_t *fujitsu_hotkey = acpi_driver_data(device); |
945 | struct input_dev *input = fujitsu_hotkey->input; | 945 | struct input_dev *input = fujitsu_hotkey->input; |
946 | 946 | ||
947 | #ifdef CONFIG_LEDS_CLASS | 947 | #if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) |
948 | if (fujitsu_hotkey->logolamp_registered) | 948 | if (fujitsu_hotkey->logolamp_registered) |
949 | led_classdev_unregister(&logolamp_led); | 949 | led_classdev_unregister(&logolamp_led); |
950 | 950 | ||