aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-scsi.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-01-20 02:00:28 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-09 17:39:37 -0500
commitf0d36efdc624beb3d9e29b9ab9e9537bf0f25d5b (patch)
treeeac4efb465aa682d6eaac61f76b3174ffd9fd8cd /drivers/ata/libata-scsi.c
parent0529c159dbdd79794796c1b50b39442d72efbe97 (diff)
libata: update libata core layer to use devres
Update libata core layer to use devres. * ata_device_add() acquires all resources in managed mode. * ata_host is allocated as devres associated with ata_host_release. * Port attached status is handled as devres associated with ata_host_attach_release(). * Initialization failure and host removal is handedl by releasing devres group. * Except for ata_scsi_release() removal, LLD interface remains the same. Some functions use hacky is_managed test to support both managed and unmanaged devices. These will go away once all LLDs are updated to use devres. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-scsi.c')
-rw-r--r--drivers/ata/libata-scsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index cc229e31432f..0009818a4306 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -3305,7 +3305,8 @@ EXPORT_SYMBOL_GPL(ata_sas_port_init);
3305 3305
3306void ata_sas_port_destroy(struct ata_port *ap) 3306void ata_sas_port_destroy(struct ata_port *ap)
3307{ 3307{
3308 ap->ops->port_stop(ap); 3308 if (ap->ops->port_stop)
3309 ap->ops->port_stop(ap);
3309 kfree(ap); 3310 kfree(ap);
3310} 3311}
3311EXPORT_SYMBOL_GPL(ata_sas_port_destroy); 3312EXPORT_SYMBOL_GPL(ata_sas_port_destroy);