]> git.itanic.dy.fi Git - linux-stable/commitdiff
Revert "ACPI: dock: Don't eval _STA on every show_docked sysfs read"
authorGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Feb 2009 01:16:10 +0000 (17:16 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Feb 2009 01:16:10 +0000 (17:16 -0800)
This reverts commit 1d672ef324e78a467603ef55aa4558cac9f895ba.

Thanks to David Engel <david@istwok.net> for pointing out the problem.
I had not added a previous commit that this patch relied on, causing an
oops whenever the dock sysfs file was read.

Reported-by: David Engel <david@istwok.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/acpi/dock.c

index eab790fbb69ada3176c0e0e164135b8491b9402f..e28469ec2da78b61385f0eec218d0d0ed5fcd912 100644 (file)
@@ -691,14 +691,8 @@ find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
 static ssize_t show_docked(struct device *dev,
                           struct device_attribute *attr, char *buf)
 {
-       struct acpi_device *tmp;
-
-       struct dock_station *dock_station = *((struct dock_station **)
-               dev->platform_data);
+       return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(dock_station));
 
-       if (ACPI_SUCCESS(acpi_bus_get_device(dock_station->handle, &tmp)))
-               return snprintf(buf, PAGE_SIZE, "1\n");
-       return snprintf(buf, PAGE_SIZE, "0\n");
 }
 static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);