Linux-LEDs Archive on
 help / color / Atom feed
* Fwd: linux-next: build failure after merge of the leds tree
       [not found] <>
@ 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 <>
To: Stephen Rothwell <>
CC: Linux Next Mailing List <>, Linux Kernel
Mailing List <>, Bartosz Golaszewski
<>, Lee Jones <>

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);


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

+#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
                of_property_read_string(child, "linux,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] <>
2019-07-25 18:46 ` Fwd: linux-next: build failure after merge of the leds tree Jacek Anaszewski

Linux-LEDs Archive on

Archives are clonable:
	git clone --mirror 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/ \
	public-inbox-index linux-leds

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox