• B
    [PATCH] pnp: mpu401: adjust pnp_register_driver signature · f301ae6a
    Bjorn Helgaas 提交于
    This series of patches removes 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.  (Many devices don't support
    hot-plug, of course, but PNP in general does.)
    
    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().
    
    If drivers need to know the number of devices, they can count calls to their
    .probe() methods.
    
    This patch:
    
    Remove the assumption that pnp_register_driver() returns the number of devices
    claimed.
    Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
    Cc: Adam Belay <ambx1@neo.rr.com>
    Signed-off-by: NAndrew Morton <akpm@osdl.org>
    Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
    f301ae6a
mpu401.c 7.3 KB