Re: [PATCH 2/4] led: class: Add devm_fwnode_led_get() to get a LED from a firmware node

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

 



On Wed, Jun 15, 2022 at 5:49 PM Jean-Jacques Hiblot
<jjhiblot@xxxxxxxxxxxxxxx> wrote:
>
> Same functionality as devm_of_led_get(), but it takes a firmware node
> as a parameter.
> This mimic devm_fwnode_pwm_get() found in the PWM core.
>
> The ACPI implementation is missing and the function returns -EOPNOTSUPP
> when the firmware node is actually an ACPI node.

...

> +       if (is_of_node(fwnode))
> +               led = of_led_get(to_of_node(fwnode), index);
> +       else if (is_acpi_node(fwnode))
> +               /* ACPI support is not yet implemented */
> +               led = ERR_PTR(-EOPNOTSUPP);
> +       if (IS_ERR(led))
> +               return led;

Yeah, acpi.h is needed here and it needs to be ordered, I guess should
be added somewhere at the top of the header block.

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux