Re: [PATCH 1/2] ACPI: Add helper acpi_use_parent_companion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 15, 2023 at 11:34 PM Heiner Kallweit <hkallweit1@xxxxxxxxx> wrote:
>
> In several drivers devices use the ACPI companion of the parent.
> Add a helper for this use case to avoid code duplication.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>

or do you want me to apply it?

> ---
>  include/linux/acpi.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index ba3f601b6..89efb1658 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -1541,4 +1541,9 @@ static inline void acpi_device_notify(struct device *dev) { }
>  static inline void acpi_device_notify_remove(struct device *dev) { }
>  #endif
>
> +static inline void acpi_use_parent_companion(struct device *dev)
> +{
> +       ACPI_COMPANION_SET(dev, ACPI_COMPANION(dev->parent));
> +}
> +
>  #endif /*_LINUX_ACPI_H*/
> --
> 2.42.0
>
>





[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux