Skip to content

Commit

Permalink
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/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
  • Loading branch information
Linus Torvalds committed Oct 15, 2009
2 parents 13e356c + d59733c commit bd72f85
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 15 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions drivers/acpi/button.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
11 changes: 11 additions & 0 deletions drivers/acpi/pci_root.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/video_detect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
31 changes: 21 additions & 10 deletions drivers/platform/x86/eeepc-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/platform/x86/fujitsu-laptop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bd72f85

Please sign in to comment.