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 GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux