Linux-LEDs Archive on lore.kernel.org
 help / color / Atom feed
* Fwd: linux-next: build failure after merge of the leds tree
       [not found] <bf55a00a-18f5-d7c4-cae1-8c110b9f0e13@gmail.com>
@ 2019-07-25 18:46 ` Jacek Anaszewski
  0 siblings, 0 replies; only message in thread
From: Jacek Anaszewski @ 2019-07-25 18:46 UTC (permalink / raw)
  To: Linux LED Subsystem

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bf55a00a-18f5-d7c4-cae1-8c110b9f0e13@gmail.com>
2019-07-25 18:46 ` Fwd: linux-next: build failure after merge of the leds tree Jacek Anaszewski

Linux-LEDs Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-leds/0 linux-leds/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-leds linux-leds/ https://lore.kernel.org/linux-leds \
		linux-leds@vger.kernel.org linux-leds@archiver.kernel.org
	public-inbox-index linux-leds


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-leds


AGPL code for this site: git clone https://public-inbox.org/ public-inbox