aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 781d0959a228..a927c4c8bef3 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5992,6 +5992,23 @@ void ata_port_detach(struct ata_port *ap)
5992} 5992}
5993 5993
5994/** 5994/**
5995 * ata_host_detach - Detach all ports of an ATA host
5996 * @host: Host to detach
5997 *
5998 * Detach all ports of @host.
5999 *
6000 * LOCKING:
6001 * Kernel thread context (may sleep).
6002 */
6003void ata_host_detach(struct ata_host *host)
6004{
6005 int i;
6006
6007 for (i = 0; i < host->n_ports; i++)
6008 ata_port_detach(host->ports[i]);
6009}
6010
6011/**
5995 * ata_host_remove - PCI layer callback for device removal 6012 * ata_host_remove - PCI layer callback for device removal
5996 * @host: ATA host set that was removed 6013 * @host: ATA host set that was removed
5997 * 6014 *
@@ -6006,8 +6023,7 @@ void ata_host_remove(struct ata_host *host)
6006{ 6023{
6007 unsigned int i; 6024 unsigned int i;
6008 6025
6009 for (i = 0; i < host->n_ports; i++) 6026 ata_host_detach(host);
6010 ata_port_detach(host->ports[i]);
6011 6027
6012 free_irq(host->irq, host); 6028 free_irq(host->irq, host);
6013 if (host->irq2) 6029 if (host->irq2)
@@ -6382,7 +6398,7 @@ EXPORT_SYMBOL_GPL(ata_std_bios_param);
6382EXPORT_SYMBOL_GPL(ata_std_ports); 6398EXPORT_SYMBOL_GPL(ata_std_ports);
6383EXPORT_SYMBOL_GPL(ata_host_init); 6399EXPORT_SYMBOL_GPL(ata_host_init);
6384EXPORT_SYMBOL_GPL(ata_device_add); 6400EXPORT_SYMBOL_GPL(ata_device_add);
6385EXPORT_SYMBOL_GPL(ata_port_detach); 6401EXPORT_SYMBOL_GPL(ata_host_detach);
6386EXPORT_SYMBOL_GPL(ata_host_remove); 6402EXPORT_SYMBOL_GPL(ata_host_remove);
6387EXPORT_SYMBOL_GPL(ata_sg_init); 6403EXPORT_SYMBOL_GPL(ata_sg_init);
6388EXPORT_SYMBOL_GPL(ata_sg_init_one); 6404EXPORT_SYMBOL_GPL(ata_sg_init_one);