When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
flag is not handled properly. It can lead to the PWM not being found.
Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Nicolas Ferre <[email protected]>
---
drivers/video/backlight/pwm_bl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 3a145a643e0d..6897f1c1bc73 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -274,6 +274,10 @@ static int pwm_backlight_probe(struct platform_device *pdev)
pb->pwm = devm_pwm_get(&pdev->dev, NULL);
if (IS_ERR(pb->pwm)) {
+ ret = PTR_ERR(pb->pwm);
+ if (ret == -EPROBE_DEFER)
+ goto err_alloc;
+
dev_err(&pdev->dev, "unable to request PWM, trying legacy API\n");
pb->legacy = true;
pb->pwm = pwm_request(data->pwm_id, "pwm-backlight");
--
2.1.3
Hi Lee,
On Thu, 12 Mar 2015 09:02:24 +0000
Lee Jones <[email protected]> wrote:
> On Thu, 19 Feb 2015, Nicolas Ferre wrote:
>
> > When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
> > flag is not handled properly. It can lead to the PWM not being found.
> >
> > Signed-off-by: Boris Brezillon <[email protected]>
> > Signed-off-by: Nicolas Ferre <[email protected]>
> > ---
> > drivers/video/backlight/pwm_bl.c | 4 ++++
> > 1 file changed, 4 insertions(+)
>
> Applied, thanks.
I don't see this patch in Linus' tree (actually, it's not even in
linux-next).
I don't know where it's stuck, but could you make sure it reaches
mainline for 4.2 (or 4.1 if it's not to late) ?
Best Regards,
Boris
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
Stephen, Boris,
> > > When trying to request the PWM device with devm_pwm_get(), the EPROBE_DEFER
> > > flag is not handled properly. It can lead to the PWM not being found.
> > >
> > > Signed-off-by: Boris Brezillon <[email protected]>
> > > Signed-off-by: Nicolas Ferre <[email protected]>
> > > ---
> > > drivers/video/backlight/pwm_bl.c | 4 ++++
> > > 1 file changed, 4 insertions(+)
> >
> > Applied, thanks.
>
> I don't see this patch in Linus' tree (actually, it's not even in
> linux-next).
> I don't know where it's stuck, but could you make sure it reaches
> mainline for 4.2 (or 4.1 if it's not to late) ?
Sorry for the confusion.
It looks like my for-backlight-fixes branch isn't in -next.
Stephen, could you rectify that please?
M: git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Hi Lee,
On Tue, 26 May 2015 08:36:48 +0100 Lee Jones <[email protected]> wrote:
>
> It looks like my for-backlight-fixes branch isn't in -next.
>
> Stephen, could you rectify that please?
>
> M: git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git
Added from today.
Thanks for adding your subsystem tree as a participant of linux-next. As
you may know, this is not a judgment of your code. The purpose of
linux-next is for integration testing and to lower the impact of
conflicts between subsystems in the next merge window.
You will need to ensure that the patches/commits in your tree/series have
been:
* submitted under GPL v2 (or later) and include the Contributor's
Signed-off-by,
* posted to the relevant mailing list,
* reviewed by you (or another maintainer of your subsystem tree),
* successfully unit tested, and
* destined for the current or next Linux merge window.
Basically, this should be just what you would send to Linus (or ask him
to fetch). It is allowed to be rebased if you deem it necessary.
--
Cheers,
Stephen Rothwell
[email protected]