diff options
-rw-r--r-- | drivers/acpi/dock.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 5b30b8d91d71..afd5db3c7562 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c | |||
@@ -855,10 +855,14 @@ fdd_out: | |||
855 | static ssize_t show_docked(struct device *dev, | 855 | static ssize_t show_docked(struct device *dev, |
856 | struct device_attribute *attr, char *buf) | 856 | struct device_attribute *attr, char *buf) |
857 | { | 857 | { |
858 | struct acpi_device *tmp; | ||
859 | |||
858 | struct dock_station *dock_station = *((struct dock_station **) | 860 | struct dock_station *dock_station = *((struct dock_station **) |
859 | dev->platform_data); | 861 | dev->platform_data); |
860 | return snprintf(buf, PAGE_SIZE, "%d\n", dock_present(dock_station)); | ||
861 | 862 | ||
863 | if (ACPI_SUCCESS(acpi_bus_get_device(dock_station->handle, &tmp))) | ||
864 | return snprintf(buf, PAGE_SIZE, "1\n"); | ||
865 | return snprintf(buf, PAGE_SIZE, "0\n"); | ||
862 | } | 866 | } |
863 | static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); | 867 | static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL); |
864 | 868 | ||