diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-12 17:16:10 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-02-12 17:16:10 -0800 |
commit | 95ef5ab4c1452de3695c135b69350626b82fccaf (patch) | |
tree | f1fc0f945f237eca620a65ace666a56ca70ea68b | |
parent | 1b622b5641b03a44d1c455b961b6b9f24d8cc634 (diff) | |
download | lwn-95ef5ab4c1452de3695c135b69350626b82fccaf.tar.gz lwn-95ef5ab4c1452de3695c135b69350626b82fccaf.zip |
Revert "ACPI: dock: Don't eval _STA on every show_docked sysfs read"
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>
-rw-r--r-- | drivers/acpi/dock.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index eab790fbb69a..e28469ec2da7 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); |