mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
ARM: 8524/1: driver cohandle -EPROBE_DEFER from bus_type.match()
Allow implementations of the match() callback in struct bus_type to return errors and if it's -EPROBE_DEFER then queue the device for deferred probing. This is useful to buses such as AMBA in which devices are registered before their matching information can be retrieved from the HW (typically because a clock driver hasn't probed yet). [changed if-else code structure, adjusted documentation to match the code, extended comments] Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
17f29d36e4
commit
656b8035b0
3 changed files with 31 additions and 6 deletions
|
@ -340,8 +340,10 @@ comparison:
|
|||
|
||||
int (*match)(struct device * dev, struct device_driver * drv);
|
||||
|
||||
match should return '1' if the driver supports the device, and '0'
|
||||
otherwise.
|
||||
match should return positive value if the driver supports the device,
|
||||
and zero otherwise. It may also return error code (for example
|
||||
-EPROBE_DEFER) if determining that given driver supports the device is
|
||||
not possible.
|
||||
|
||||
When a device is registered, the bus's list of drivers is iterated
|
||||
over. bus->match() is called for each one until a match is found.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue