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: NRafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: NMark Brown <broonie@kernel.org> Acked-by: NMika Westerberg <mika.westerberg@linux.intel.com> Acked-by: NWei Liu <wei.liu@kernel.org> Reviewed-by: NPunit Agrawal <punit.agrawal@bytedance.com>
Showing
想要评论请 注册 或 登录