summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-02 20:09:08 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-02 20:09:08 -0800
commit13df7977431e3b906a23bb75f29e0f40a8d73f87 (patch)
treebc2c78c3b816a65f90c31cccebdc15b38352c045 /drivers/acpi/dock.c
parent6d8b3e1ad3d3815d9c87b8553493301e243af76a (diff)
parent0414855fdc4a40da05221fc6062cccbc0c30f169 (diff)
downloadop-kernel-dev-13df7977431e3b906a23bb75f29e0f40a8d73f87.zip
op-kernel-dev-13df7977431e3b906a23bb75f29e0f40a8d73f87.tar.gz
Merge 3.14-rc5 into driver-core-next
We want the fixes in here.
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r--drivers/acpi/dock.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index e9b3081..5bfd769 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);
OpenPOWER on IntegriCloud