diff options
Diffstat (limited to 'drivers/acpi/dock.c')
-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 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); |