mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] pnp: PNP: adjust pnp_register_driver signature
Remove the assumption that pnp_register_driver() returns the number of devices claimed. Returning the count is unreliable because devices may be hot-plugged in the future. This changes the convention to "zero for success, or a negative error value," which matches pci_register_driver(), acpi_bus_register_driver(), and platform_driver_register(). Signed-off-by: Bjorn Helgaas <[email protected]> Cc: Adam Belay <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
070c699983
commit
982c609448
3 changed files with 11 additions and 27 deletions
|
|
@ -115,6 +115,9 @@ pnp_unregister_protocol
|
|||
pnp_register_driver
|
||||
- adds a PnP driver to the Plug and Play Layer
|
||||
- this includes driver model integration
|
||||
- returns zero for success or a negative error number for failure; count
|
||||
calls to the .add() method if you need to know how many devices bind to
|
||||
the driver
|
||||
|
||||
pnp_unregister_driver
|
||||
- removes a PnP driver from the Plug and Play Layer
|
||||
|
|
|
|||
Loading…
Reference in a new issue