Messages in this thread | | | From | Andy Shevchenko <> | Date | Wed, 15 Jun 2022 17:54:49 +0200 | Subject | Re: [PATCH 2/4] led: class: Add devm_fwnode_led_get() to get a LED from a firmware node |
| |
On Wed, Jun 15, 2022 at 5:49 PM Jean-Jacques Hiblot <jjhiblot@traphandler.com> 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
| |