* Re: [PATCH 1/2] misc: atmel_pwm: add deferred-probing support
[not found] ` <1382459560-26596-2-git-send-email-jhovold@gmail.com>
@ 2013-10-30 11:25 ` Johan Hovold
2013-10-30 13:24 ` Greg Kroah-Hartman
0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2013-10-30 11:25 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Arnd Bergmann, linux-kernel, Nicolas Ferre, linux-arm-kernel,
Johan Hovold, stable
On Tue, Oct 22, 2013 at 06:32:39PM +0200, Johan Hovold wrote:
> Two drivers (atmel-pwm-bl and leds-atmel-pwm) currently depend on the
> atmel_pwm driver to have bound to any pwm-device before their devices
> are probed.
>
> Support deferred probing of such devices by making sure to return
> -EPROBE_DEFER from pwm_channel_alloc when no pwm-device has yet been
> bound.
>
> Signed-off-by: Johan Hovold <jhovold@gmail.com>
This patch, 5c6d6fd1 ("misc: atmel_pwm: add deferred-probing support"),
and 9d3fde86 ("backlight: atmel-pwm-bl: fix deferred probe from __init")
in linux-next should probably be considered for inclusion in stable.
Without them the atmel-pwm-bl driver may always fail to probe depending
on link order.
Thanks,
Johan
> ---
> drivers/misc/atmel_pwm.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/misc/atmel_pwm.c b/drivers/misc/atmel_pwm.c
> index 494d050..a6dc56e 100644
> --- a/drivers/misc/atmel_pwm.c
> +++ b/drivers/misc/atmel_pwm.c
> @@ -90,8 +90,10 @@ int pwm_channel_alloc(int index, struct pwm_channel *ch)
> unsigned long flags;
> int status = 0;
>
> - /* insist on PWM init, with this signal pinned out */
> - if (!pwm || !(pwm->mask & 1 << index))
> + if (!pwm)
> + return -EPROBE_DEFER;
> +
> + if (!(pwm->mask & 1 << index))
> return -ENODEV;
>
> if (index < 0 || index >= PWM_NCHAN || !ch)
> --
> 1.8.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] misc: atmel_pwm: add deferred-probing support
2013-10-30 11:25 ` [PATCH 1/2] misc: atmel_pwm: add deferred-probing support Johan Hovold
@ 2013-10-30 13:24 ` Greg Kroah-Hartman
0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2013-10-30 13:24 UTC (permalink / raw)
To: Johan Hovold
Cc: Arnd Bergmann, linux-kernel, Nicolas Ferre, linux-arm-kernel,
stable
On Wed, Oct 30, 2013 at 12:25:51PM +0100, Johan Hovold wrote:
> On Tue, Oct 22, 2013 at 06:32:39PM +0200, Johan Hovold wrote:
> > Two drivers (atmel-pwm-bl and leds-atmel-pwm) currently depend on the
> > atmel_pwm driver to have bound to any pwm-device before their devices
> > are probed.
> >
> > Support deferred probing of such devices by making sure to return
> > -EPROBE_DEFER from pwm_channel_alloc when no pwm-device has yet been
> > bound.
> >
> > Signed-off-by: Johan Hovold <jhovold@gmail.com>
>
> This patch, 5c6d6fd1 ("misc: atmel_pwm: add deferred-probing support"),
> and 9d3fde86 ("backlight: atmel-pwm-bl: fix deferred probe from __init")
> in linux-next should probably be considered for inclusion in stable.
>
> Without them the atmel-pwm-bl driver may always fail to probe depending
> on link order.
Ok, I'll watch this for when it hits Linus's tree, thanks for letting me
know.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-30 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1382459560-26596-1-git-send-email-jhovold@gmail.com>
[not found] ` <1382459560-26596-2-git-send-email-jhovold@gmail.com>
2013-10-30 11:25 ` [PATCH 1/2] misc: atmel_pwm: add deferred-probing support Johan Hovold
2013-10-30 13:24 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox