misc: atmel_pwm: add deferred-probing support
authorJohan Hovold <jhovold@gmail.com>
Tue, 22 Oct 2013 16:32:39 +0000 (18:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Nov 2013 20:27:47 +0000 (12:27 -0800)
commitccd24ec4c98c1aa76e73d4fa80bf8146b5e62175
treef5cd612daef66276b4c77202b9b3ebbdc1b98ac8
parentdfd6a61d259ea14fb87a3c0e7980b2e77261ff90
misc: atmel_pwm: add deferred-probing support

commit 5c6d6fd1564138ad048564e48639f842714a90c6 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/atmel_pwm.c