lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfnSKadgE1=awBGjseU2mcky3FbLXXZ6S_qxPEpt9hmCw@mail.gmail.com>
Date:   Wed, 15 Jun 2022 17:54:49 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Jean-Jacques Hiblot <jjhiblot@...phandler.com>
Cc:     Pavel Machek <pavel@....cz>, Rob Herring <robh+dt@...nel.org>,
        Sven Schwermer <sven.schwermer@...ruptive-technologies.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        johan+linaro@...nel.org,
        Marijn Suijten <marijn.suijten@...ainline.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Linux LED Subsystem <linux-leds@...r.kernel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
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@...phandler.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ