]> git.baikalelectronics.ru Git - kernel.git/commit
ahci_platform: enable hotplug unbinding
authorBrian Norris <computersforpeace@gmail.com>
Fri, 2 Nov 2012 07:46:15 +0000 (00:46 -0700)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 3 Dec 2012 10:14:07 +0000 (05:14 -0500)
commit2d6e6c14a9d2439defb40e81e9ecdc27875f2ea3
tree3cd8f36eb3bde779d70814d5fc3443ae3ba897c9
parent0882ea7f6bdc3122eb4d585dbe06acfef112233e
ahci_platform: enable hotplug unbinding

platform_driver_probe() should be used for registering this driver only
if we want to

    "...remove its run-once probe() infrastructure from memory after the
    driver has bound to the device."

However, we may want to leave the probe infrastructure in place in order
to support binding/unbinding a device dynamically. This is useful, for
instance, as a power management mechanism, where a device can be totally
powered down when unbound (whereas with runtime power management,
powering down the SATA core would incur unacceptable loss of
functionality).

Thus, convert this driver to use platform_driver_register().

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/ahci_platform.c