X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Facpi%2Fdock.c;h=5bfd769fc91fa5bfd0890a146a4eed13ac342ff0;hb=0f2776e6151a123552fd06b666fe755fa780a967;hp=e9b3081c4fe994bdfd7dcba5b54ae0533cf8f110;hpb=0c6a4812a0e1879daa6c8ac88e566dbb85e1ea70;p=~andy%2Flinux diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index e9b3081c4fe..5bfd769fc91 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -713,13 +713,11 @@ static acpi_status __init find_dock_devices(acpi_handle handle, u32 lvl, static ssize_t show_docked(struct device *dev, struct device_attribute *attr, char *buf) { - struct acpi_device *tmp; - struct dock_station *dock_station = dev->platform_data; + struct acpi_device *adev = NULL; - if (!acpi_bus_get_device(dock_station->handle, &tmp)) - return snprintf(buf, PAGE_SIZE, "1\n"); - return snprintf(buf, PAGE_SIZE, "0\n"); + acpi_bus_get_device(dock_station->handle, &adev); + return snprintf(buf, PAGE_SIZE, "%u\n", acpi_device_enumerated(adev)); } static DEVICE_ATTR(docked, S_IRUGO, show_docked, NULL);