summaryrefslogtreecommitdiff
path: root/drivers/acpi/dock.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-12-03 19:37:10 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-12-17 20:45:51 +0300
commit99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a (patch)
treedc5fc7a0bdbd65678c60cc8f1125191587e4e2e8 /drivers/acpi/dock.c
parente3c963c498871e0d4b2eceb32e2b989493838ccc (diff)
downloadlinux-99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a.tar.xz
ACPI: Use acpi_fetch_acpi_dev() instead of acpi_bus_get_device()
Modify the ACPI code to use acpi_fetch_acpi_dev() instead of acpi_bus_get_device() where applicable. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/acpi/dock.c')
-rw-r--r--drivers/acpi/dock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index c8e9b962e18c..a89bdbe00184 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -489,9 +489,8 @@ static ssize_t docked_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct dock_station *dock_station = dev->platform_data;
- struct acpi_device *adev = NULL;
+ struct acpi_device *adev = acpi_fetch_acpi_dev(dock_station->handle);
- acpi_bus_get_device(dock_station->handle, &adev);
return sysfs_emit(buf, "%u\n", acpi_device_enumerated(adev));
}
static DEVICE_ATTR_RO(docked);