linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Linux LED Subsystem <linux-leds@vger.kernel.org>
Subject: Fwd: linux-next: build failure after merge of the leds tree
Date: Thu, 25 Jul 2019 20:46:59 +0200	[thread overview]
Message-ID: <5810c4b2-c3d6-560f-b807-351e90b44877@gmail.com> (raw)
In-Reply-To: <bf55a00a-18f5-d7c4-cae1-8c110b9f0e13@gmail.com>

Fwd to linux-leds.

-------- Forwarded Message --------
Subject: Re: linux-next: build failure after merge of the leds tree
Date: Thu, 25 Jul 2019 20:44:33 +0200
From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>
CC: Linux Next Mailing List <linux-next@vger.kernel.org>, Linux Kernel
Mailing List <linux-kernel@vger.kernel.org>, Bartosz Golaszewski
<bgolaszewski@baylibre.com>, Lee Jones <lee.jones@linaro.org>

On 7/25/19 4:31 AM, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the leds tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
> 
> drivers/leds/leds-max77650.c: In function 'max77650_led_probe':
> drivers/leds/leds-max77650.c:121:8: error: implicit declaration of function 'devm_of_led_classdev_register'; did you mean 'devm_led_classdev_register'? [-Werror=implicit-function-declaration]
>    rv = devm_of_led_classdev_register(dev, child, &led->cdev);
>         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>         devm_led_classdev_register
> 
> Caused by commit
> 
>   4eba5b82096e ("leds: class: Improve LED and LED flash class registration API")
> 
> interacting with commit
> 
>   5be102eb161a ("leds: max77650: Add LEDs support")
> 
> I have used the leds tree from next-20190724 for today.
> 

I forgot about this driver jumping in lately.

But here is the fixup and the rationale:

devm_of_led_classdev_register() API has been useless from the beginning,
since it was just an initial portion of work aiming at adding some
generic DT parser. The actual parser had not been added up to this
commit which also switches the API:

devm_of_led_classdev_register(struct device *parent,
                              struct device_node *np,
                              struct led_classdev *led_cdev);

to:

devm_led_classdev_register_ext(struct device *parent,
                               struct led_classdev *led_cdev,
                               struct led_init_data *init_data)

To not break the bisectibility The remaining users of
devm_of_led_classdev_register are being fixed by this commit to use the
wrapper:

+#define devm_led_classdev_register(parent, led_cdev)           \
+       devm_led_classdev_register_ext(parent, led_cdev, NULL)


leds-max77650.c is the one that was omitted, so I've just applied
the following fix to this commit:

diff --git a/drivers/leds/leds-max77650.c b/drivers/leds/leds-max77650.c
index 04738324b3e6..5a14f9775b0e 100644
--- a/drivers/leds/leds-max77650.c
+++ b/drivers/leds/leds-max77650.c
@@ -118,7 +118,7 @@ static int max77650_led_probe(struct platform_device
*pdev)
                of_property_read_string(child, "linux,default-trigger",
                                        &led->cdev.default_trigger);

-               rv = devm_of_led_classdev_register(dev, child, &led->cdev);
+               rv = devm_led_classdev_register(dev, &led->cdev);
                if (rv)
                        goto err_node_put;

and melded it with the original one to not break the bisect.

If you have any doubts please let me know.


Best regards,
Jacek Anaszewski

           reply	other threads:[~2019-07-25 18:47 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <bf55a00a-18f5-d7c4-cae1-8c110b9f0e13@gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5810c4b2-c3d6-560f-b807-351e90b44877@gmail.com \
    --to=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).