* [PATCH 1/1] PWM Backlight: Fix a bug which could cause the PWM backlight driver use the wrong PWM chip and fail the driver probing if multiple PWM chips exist. This defect could also cause the unintended PWM chip used and unaccessable by other drivers. The patch will check the error state first and allow a deferral PWM backlight probing if the intended PWM driver is not loaded at the probing moment. @ 2014-09-03 20:00 ryang 2014-09-04 8:38 ` Lee Jones 0 siblings, 1 reply; 4+ messages in thread From: ryang @ 2014-09-03 20:00 UTC (permalink / raw) To: thierry.reding, jg1.han, lee.jones; +Cc: linux-pwm, ryang Signed-off-by: ryang <ryang@hach.com> --- drivers/video/backlight/pwm_bl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index b85983e..e0014a5 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -273,6 +273,9 @@ 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->pwm = pwm_request(data->pwm_id, "pwm-backlight"); -- 1.9.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] PWM Backlight: Fix a bug which could cause the PWM backlight driver use the wrong PWM chip and fail the driver probing if multiple PWM chips exist. This defect could also cause the unintended PWM chip used and unaccessable by other drivers. The patch will check the error state first and allow a deferral PWM backlight probing if the intended PWM driver is not loaded at the probing moment. 2014-09-03 20:00 [PATCH 1/1] PWM Backlight: Fix a bug which could cause the PWM backlight driver use the wrong PWM chip and fail the driver probing if multiple PWM chips exist. This defect could also cause the unintended PWM chip used and unaccessable by other drivers. The patch will check the error state first and allow a deferral PWM backlight probing if the intended PWM driver is not loaded at the probing moment ryang @ 2014-09-04 8:38 ` Lee Jones 2014-09-04 8:39 ` Lee Jones 0 siblings, 1 reply; 4+ messages in thread From: Lee Jones @ 2014-09-04 8:38 UTC (permalink / raw) To: ryang; +Cc: thierry.reding, jg1.han, linux-pwm, ryang I'm guessing this is your first patch. Please read: Documentation/SubmittingPatches A few notes for you search for and read about in the above document. - Subject line formatting (short, succinct) - Commit logs (present, descriptive [what changed and why], succinct) - Authorship (full/real names only) > Signed-off-by: ryang <ryang@hach.com> > --- > drivers/video/backlight/pwm_bl.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c > index b85983e..e0014a5 100644 > --- a/drivers/video/backlight/pwm_bl.c > +++ b/drivers/video/backlight/pwm_bl.c > @@ -273,6 +273,9 @@ 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->pwm = pwm_request(data->pwm_id, "pwm-backlight"); -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] PWM Backlight: Fix a bug which could cause the PWM backlight driver use the wrong PWM chip and fail the driver probing if multiple PWM chips exist. This defect could also cause the unintended PWM chip used and unaccessable by other drivers. The patch will check the error state first and allow a deferral PWM backlight probing if the intended PWM driver is not loaded at the probing moment. 2014-09-04 8:38 ` Lee Jones @ 2014-09-04 8:39 ` Lee Jones 2014-09-04 15:33 ` [PATCH 1/1] PWM Backlight: Fix a bug which could cause the PWM backlight driver use the wrong PWM chip and fail the driver probing if multiple PWM chips exist. This defect could also cause the unintended PWM chip used and unaccessable by other dri Yang, Robert 0 siblings, 1 reply; 4+ messages in thread From: Lee Jones @ 2014-09-04 8:39 UTC (permalink / raw) To: ryang; +Cc: thierry.reding, jg1.han, linux-pwm, ryang, linux-kernel > I'm guessing this is your first patch. > > Please read: Documentation/SubmittingPatches > > A few notes for you search for and read about in the above document. > > - Subject line formatting (short, succinct) > - Commit logs (present, descriptive [what changed and why], succinct) > - Authorship (full/real names only) You also need to CC linux-kernel@vger.kernel.org on all patches. > > Signed-off-by: ryang <ryang@hach.com> > > --- > > drivers/video/backlight/pwm_bl.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c > > index b85983e..e0014a5 100644 > > --- a/drivers/video/backlight/pwm_bl.c > > +++ b/drivers/video/backlight/pwm_bl.c > > @@ -273,6 +273,9 @@ 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->pwm = pwm_request(data->pwm_id, "pwm-backlight"); > -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog ^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH 1/1] PWM Backlight: Fix a bug which could cause the PWM backlight driver use the wrong PWM chip and fail the driver probing if multiple PWM chips exist. This defect could also cause the unintended PWM chip used and unaccessable by other dri... 2014-09-04 8:39 ` Lee Jones @ 2014-09-04 15:33 ` Yang, Robert 0 siblings, 0 replies; 4+ messages in thread From: Yang, Robert @ 2014-09-04 15:33 UTC (permalink / raw) To: Lee Jones, ryang Cc: thierry.reding@gmail.com, jg1.han@samsung.com, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Hi Lee, It is great to get your reply. No, this is a second one, actually it is a resend. This time I just followed Thierry's instruction using the git patch and send-mail commands. Robert -----Original Message----- From: Lee Jones [mailto:lee.jones@linaro.org] Sent: Thursday, September 04, 2014 2:40 AM To: ryang Cc: thierry.reding@gmail.com; jg1.han@samsung.com; linux-pwm@vger.kernel.org; Yang, Robert; linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] PWM Backlight: Fix a bug which could cause the PWM backlight driver use the wrong PWM chip and fail the driver probing if multiple PWM chips exist. This defect could also cause the unintended PWM chip used and unaccessable by other dri... > I'm guessing this is your first patch. > > Please read: Documentation/SubmittingPatches > > A few notes for you search for and read about in the above document. > > - Subject line formatting (short, succinct) > - Commit logs (present, descriptive [what changed and why], succinct) > - Authorship (full/real names only) You also need to CC linux-kernel@vger.kernel.org on all patches. > > Signed-off-by: ryang <ryang@hach.com> > > --- > > drivers/video/backlight/pwm_bl.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/drivers/video/backlight/pwm_bl.c > > b/drivers/video/backlight/pwm_bl.c > > index b85983e..e0014a5 100644 > > --- a/drivers/video/backlight/pwm_bl.c > > +++ b/drivers/video/backlight/pwm_bl.c > > @@ -273,6 +273,9 @@ 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->pwm = pwm_request(data->pwm_id, "pwm-backlight"); > -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog Please be advised that this email may contain confidential information. If you are not the intended recipient, please notify us by email by replying to the sender and delete this message. The sender disclaims that the content of this email constitutes an offer to enter into, or the acceptance of, any agreement; provided that the foregoing does not invalidate the binding effect of any digital or other electronic reproduction of a manual signature that is included in any attachment. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-04 15:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-09-03 20:00 [PATCH 1/1] PWM Backlight: Fix a bug which could cause the PWM backlight driver use the wrong PWM chip and fail the driver probing if multiple PWM chips exist. This defect could also cause the unintended PWM chip used and unaccessable by other drivers. The patch will check the error state first and allow a deferral PWM backlight probing if the intended PWM driver is not loaded at the probing moment ryang 2014-09-04 8:38 ` Lee Jones 2014-09-04 8:39 ` Lee Jones 2014-09-04 15:33 ` [PATCH 1/1] PWM Backlight: Fix a bug which could cause the PWM backlight driver use the wrong PWM chip and fail the driver probing if multiple PWM chips exist. This defect could also cause the unintended PWM chip used and unaccessable by other dri Yang, Robert
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox