summaryrefslogtreecommitdiff
path: root/drivers/acpi/sbshc.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-08-24 19:59:48 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-08-24 21:55:24 +0300
commit62fcb99bdf10fed34b4fe6e225489fe4be2d0536 (patch)
tree21c1d879b4b903631d3c415bb53c08579f11fe97 /drivers/acpi/sbshc.c
parent6e1850b2f3747942d3813a2fde82f1e46aa593d1 (diff)
downloadlinux-62fcb99bdf10fed34b4fe6e225489fe4be2d0536.tar.xz
ACPI: Drop parent field from struct acpi_device
The parent field in struct acpi_device is, in fact, redundant, because the dev.parent field in it effectively points to the same object and it is used by the driver core. Accordingly, the parent field can be dropped from struct acpi_device and for this purpose define acpi_dev_parent() to retrieve a parent struct acpi_device pointer from the dev.parent field in struct acpi_device. Next, update all of the users of the parent field in struct acpi_device to use acpi_dev_parent() instead of it and drop it. While at it, drop the ACPI_IS_ROOT_DEVICE() macro that is only used in one place in a confusing way. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Wei Liu <wei.liu@kernel.org> Reviewed-by: Punit Agrawal <punit.agrawal@bytedance.com>
Diffstat (limited to 'drivers/acpi/sbshc.c')
-rw-r--r--drivers/acpi/sbshc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/sbshc.c b/drivers/acpi/sbshc.c
index 7c62e149a7a1..340e0b61587e 100644
--- a/drivers/acpi/sbshc.c
+++ b/drivers/acpi/sbshc.c
@@ -266,7 +266,7 @@ static int acpi_smbus_hc_add(struct acpi_device *device)
mutex_init(&hc->lock);
init_waitqueue_head(&hc->wait);
- hc->ec = acpi_driver_data(device->parent);
+ hc->ec = acpi_driver_data(acpi_dev_parent(device));
hc->offset = (val >> 8) & 0xff;
hc->query_bit = val & 0xff;
device->driver_data = hc;