From 95ef5ab4c1452de3695c135b69350626b82fccaf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 12 Feb 2009 17:16:10 -0800 Subject: Revert "ACPI: dock: Don't eval _STA on every show_docked sysfs read" This reverts commit 1d672ef324e78a467603ef55aa4558cac9f895ba. Thanks to David Engel 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 Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/dock.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index eab790fbb69..e28469ec2da 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -691,14 +691,8 @@ fdd_out: 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); -- cgit v1.2.3-18-g5258