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
This commit is contained in:
commit
bd72f85b9a
8 changed files with 46 additions and 15 deletions
|
@ -218,10 +218,10 @@ config ACPI_PROCESSOR_AGGREGATOR
|
|||
depends on X86
|
||||
help
|
||||
ACPI 4.0 defines processor Aggregator, which enables OS to perform
|
||||
specfic processor configuration and control that applies to all
|
||||
specific processor configuration and control that applies to all
|
||||
processors in the platform. Currently only logical processor idling
|
||||
is defined, which is to reduce power consumption. This driver
|
||||
support the new device.
|
||||
supports the new device.
|
||||
|
||||
config ACPI_THERMAL
|
||||
tristate "Thermal Zone"
|
||||
|
|
|
@ -245,6 +245,7 @@ static void acpi_ac_notify(struct acpi_device *device, u32 event)
|
|||
acpi_bus_generate_netlink_event(device->pnp.device_class,
|
||||
dev_name(&device->dev), event,
|
||||
(u32) ac->state);
|
||||
acpi_notifier_call_chain(device, event, (u32) ac->state);
|
||||
#ifdef CONFIG_ACPI_SYSFS_POWER
|
||||
kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
|
||||
#endif
|
||||
|
|
|
@ -251,6 +251,9 @@ int acpi_lid_open(void)
|
|||
acpi_status status;
|
||||
unsigned long long state;
|
||||
|
||||
if (!lid_device)
|
||||
return -ENODEV;
|
||||
|
||||
status = acpi_evaluate_integer(lid_device->handle, "_LID", NULL,
|
||||
&state);
|
||||
if (ACPI_FAILURE(status))
|
||||
|
|
|
@ -389,6 +389,17 @@ struct pci_dev *acpi_get_pci_dev(acpi_handle handle)
|
|||
|
||||
pbus = pdev->subordinate;
|
||||
pci_dev_put(pdev);
|
||||
|
||||
/*
|
||||
* This function may be called for a non-PCI device that has a
|
||||
* PCI parent (eg. a disk under a PCI SATA controller). In that
|
||||
* case pdev->subordinate will be NULL for the parent.
|
||||
*/
|
||||
if (!pbus) {
|
||||
dev_dbg(&pdev->dev, "Not a PCI-to-PCI bridge\n");
|
||||
pdev = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
out:
|
||||
list_for_each_entry_safe(node, tmp, &device_list, node)
|
||||
|
|
|
@ -1109,7 +1109,12 @@ static int acpi_video_bus_check(struct acpi_video_bus *video)
|
|||
*/
|
||||
|
||||
/* Does this device support video switching? */
|
||||
if (video->cap._DOS) {
|
||||
if (video->cap._DOS || video->cap._DOD) {
|
||||
if (!video->cap._DOS) {
|
||||
printk(KERN_WARNING FW_BUG
|
||||
"ACPI(%s) defines _DOD but not _DOS\n",
|
||||
acpi_device_bid(video->device));
|
||||
}
|
||||
video->flags.multihead = 1;
|
||||
status = 0;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ long acpi_is_video_device(struct acpi_device *device)
|
|||
return 0;
|
||||
|
||||
/* Does this device able to support video switching ? */
|
||||
if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) &&
|
||||
if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy)) ||
|
||||
ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy)))
|
||||
video_caps |= ACPI_VIDEO_OUTPUT_SWITCHING;
|
||||
|
||||
|
|
|
@ -150,6 +150,8 @@ struct eeepc_hotk {
|
|||
/* The actual device the driver binds to */
|
||||
static struct eeepc_hotk *ehotk;
|
||||
|
||||
static void eeepc_rfkill_hotplug(bool real);
|
||||
|
||||
/* Platform device/driver */
|
||||
static int eeepc_hotk_thaw(struct device *device);
|
||||
static int eeepc_hotk_restore(struct device *device);
|
||||
|
@ -343,14 +345,23 @@ static bool eeepc_wlan_rfkill_blocked(void)
|
|||
static int eeepc_rfkill_set(void *data, bool blocked)
|
||||
{
|
||||
unsigned long asl = (unsigned long)data;
|
||||
return set_acpi(asl, !blocked);
|
||||
int ret;
|
||||
|
||||
if (asl != CM_ASL_WLAN)
|
||||
return set_acpi(asl, !blocked);
|
||||
|
||||
/* hack to avoid panic with rt2860sta */
|
||||
if (blocked)
|
||||
eeepc_rfkill_hotplug(false);
|
||||
ret = set_acpi(asl, !blocked);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static const struct rfkill_ops eeepc_rfkill_ops = {
|
||||
.set_block = eeepc_rfkill_set,
|
||||
};
|
||||
|
||||
static void __init eeepc_enable_camera(void)
|
||||
static void __devinit eeepc_enable_camera(void)
|
||||
{
|
||||
/*
|
||||
* 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,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void eeepc_rfkill_hotplug(void)
|
||||
static void eeepc_rfkill_hotplug(bool real)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
struct pci_bus *bus;
|
||||
bool blocked = eeepc_wlan_rfkill_blocked();
|
||||
bool blocked = real ? eeepc_wlan_rfkill_blocked() : true;
|
||||
|
||||
if (ehotk->wlan_rfkill)
|
||||
if (real && ehotk->wlan_rfkill)
|
||||
rfkill_set_sw_state(ehotk->wlan_rfkill, blocked);
|
||||
|
||||
mutex_lock(&ehotk->hotplug_lock);
|
||||
|
@ -692,7 +703,7 @@ static void eeepc_rfkill_notify(acpi_handle handle, u32 event, void *data)
|
|||
if (event != ACPI_NOTIFY_BUS_CHECK)
|
||||
return;
|
||||
|
||||
eeepc_rfkill_hotplug();
|
||||
eeepc_rfkill_hotplug(true);
|
||||
}
|
||||
|
||||
static void eeepc_hotk_notify(struct acpi_device *device, u32 event)
|
||||
|
@ -850,7 +861,7 @@ static int eeepc_hotk_restore(struct device *device)
|
|||
{
|
||||
/* Refresh both wlan rfkill state and pci hotplug */
|
||||
if (ehotk->wlan_rfkill)
|
||||
eeepc_rfkill_hotplug();
|
||||
eeepc_rfkill_hotplug(true);
|
||||
|
||||
if (ehotk->bluetooth_rfkill)
|
||||
rfkill_set_sw_state(ehotk->bluetooth_rfkill,
|
||||
|
@ -993,7 +1004,7 @@ static void eeepc_rfkill_exit(void)
|
|||
* Refresh pci hotplug in case the rfkill state was changed after
|
||||
* eeepc_unregister_rfkill_notifier()
|
||||
*/
|
||||
eeepc_rfkill_hotplug();
|
||||
eeepc_rfkill_hotplug(true);
|
||||
if (ehotk->hotplug_slot)
|
||||
pci_hp_deregister(ehotk->hotplug_slot);
|
||||
|
||||
|
@ -1109,7 +1120,7 @@ static int eeepc_rfkill_init(struct device *dev)
|
|||
* Refresh pci hotplug in case the rfkill state was changed during
|
||||
* setup.
|
||||
*/
|
||||
eeepc_rfkill_hotplug();
|
||||
eeepc_rfkill_hotplug(true);
|
||||
|
||||
exit:
|
||||
if (result && result != -ENODEV)
|
||||
|
@ -1189,7 +1200,7 @@ static int eeepc_input_init(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int eeepc_hotk_add(struct acpi_device *device)
|
||||
static int __devinit eeepc_hotk_add(struct acpi_device *device)
|
||||
{
|
||||
struct device *dev;
|
||||
int result;
|
||||
|
|
|
@ -944,7 +944,7 @@ static int acpi_fujitsu_hotkey_remove(struct acpi_device *device, int type)
|
|||
struct fujitsu_hotkey_t *fujitsu_hotkey = acpi_driver_data(device);
|
||||
struct input_dev *input = fujitsu_hotkey->input;
|
||||
|
||||
#ifdef CONFIG_LEDS_CLASS
|
||||
#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE)
|
||||
if (fujitsu_hotkey->logolamp_registered)
|
||||
led_classdev_unregister(&logolamp_led);
|
||||
|
||||
|
|
Loading…
Reference in a new issue