aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-08-04 14:59:17 -0400
committerTejun Heo <htejun@gmail.com>2006-08-04 14:59:17 -0400
commit6543bc0777fadf129d8ee7ac82e0090fb0480403 (patch)
tree6fc9ea06f1d70e3c6553c8ed7bc609914b13668a
parentf31e945c50e47b7163c6018928aa93b66e8f22f0 (diff)
[PATCH] [libata] manually inline ata_host_remove()
(tj: this is for the following ata_device_add() fix) Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Tejun Heo <htejun@gmail.com>
-rw-r--r--drivers/scsi/libata-core.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index bca92dd3a454..509b04889983 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -5185,28 +5185,6 @@ void ata_host_stop (struct ata_host_set *host_set)
5185 iounmap(host_set->mmio_base); 5185 iounmap(host_set->mmio_base);
5186} 5186}
5187 5187
5188
5189/**
5190 * ata_host_remove - Unregister SCSI host structure with upper layers
5191 * @ap: Port to unregister
5192 * @do_unregister: 1 if we fully unregister, 0 to just stop the port
5193 *
5194 * LOCKING:
5195 * Inherited from caller.
5196 */
5197
5198static void ata_host_remove(struct ata_port *ap, unsigned int do_unregister)
5199{
5200 struct Scsi_Host *sh = ap->host;
5201
5202 DPRINTK("ENTER\n");
5203
5204 if (do_unregister)
5205 scsi_remove_host(sh);
5206
5207 ap->ops->port_stop(ap);
5208}
5209
5210/** 5188/**
5211 * ata_dev_init - Initialize an ata_device structure 5189 * ata_dev_init - Initialize an ata_device structure
5212 * @dev: Device structure to initialize 5190 * @dev: Device structure to initialize
@@ -5532,8 +5510,11 @@ int ata_device_add(const struct ata_probe_ent *ent)
5532 5510
5533err_out: 5511err_out:
5534 for (i = 0; i < count; i++) { 5512 for (i = 0; i < count; i++) {
5535 ata_host_remove(host_set->ports[i], 1); 5513 struct ata_port *ap = host_set->ports[i];
5536 scsi_host_put(host_set->ports[i]->host); 5514
5515 scsi_remove_host(ap->host);
5516 ap->ops->port_stop(ap);
5517 scsi_host_put(ap->host);
5537 } 5518 }
5538err_free_ret: 5519err_free_ret:
5539 kfree(host_set); 5520 kfree(host_set);
@@ -5663,7 +5644,7 @@ int ata_scsi_release(struct Scsi_Host *host)
5663 DPRINTK("ENTER\n"); 5644 DPRINTK("ENTER\n");
5664 5645
5665 ap->ops->port_disable(ap); 5646 ap->ops->port_disable(ap);
5666 ata_host_remove(ap, 0); 5647 ap->ops->port_stop(ap);
5667 5648
5668 DPRINTK("EXIT\n"); 5649 DPRINTK("EXIT\n");
5669 return 1; 5650 return 1;