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>
Tue, 29 Oct 2013 23:22:57 +0000 (16:22 -0700)
commit5c6d6fd1564138ad048564e48639f842714a90c6
tree038450eadd2c1b1545dc75cc2c06202019f3c09f
parent50f67a06713599e18cd9141e413d0e2653bb242b
misc: atmel_pwm: add deferred-probing support

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