tree 823f9aec427a108c873e50f215e36d225661a068
parent 1fdab81e675c6ef76a49b8aabb7eaf4be51d1b80
author Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 12:18:28 -0400
committer Jeff Garzik <[EMAIL PROTECTED]> Tue, 30 Aug 2005 12:18:28 -0400

[libata ahci] minor remove/unplug path cleanup

Don't bother calling a hook, to call our own module, to call a helper
than simply calls ionumap().

If you unroll all that convolution, you get a simple kfree()+iounmap()
pair of calls.

 drivers/scsi/ahci.c |   14 ++------------
 1 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -189,7 +189,6 @@ static void ahci_irq_clear(struct ata_po
 static void ahci_eng_timeout(struct ata_port *ap);
 static int ahci_port_start(struct ata_port *ap);
 static void ahci_port_stop(struct ata_port *ap);
-static void ahci_host_stop(struct ata_host_set *host_set);
 static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
 static void ahci_qc_prep(struct ata_queued_cmd *qc);
 static u8 ahci_check_status(struct ata_port *ap);
@@ -242,7 +241,6 @@ static struct ata_port_operations ahci_o
 
        .port_start             = ahci_port_start,
        .port_stop              = ahci_port_stop,
-       .host_stop              = ahci_host_stop,
 };
 
 static struct ata_port_info ahci_port_info[] = {
@@ -301,14 +299,6 @@ static inline void *ahci_port_base (void
        return (void *) ahci_port_base_ul((unsigned long)base, port);
 }
 
-static void ahci_host_stop(struct ata_host_set *host_set)
-{
-       struct ahci_host_priv *hpriv = host_set->private_data;
-       kfree(hpriv);
-
-       ata_host_stop(host_set);
-}
-
 static int ahci_port_start(struct ata_port *ap)
 {
        struct device *dev = ap->host_set->dev;
@@ -1089,7 +1079,8 @@ static void ahci_remove_one (struct pci_
                scsi_host_put(ap->host);
        }
 
-       host_set->ops->host_stop(host_set);
+       kfree(hpriv);
+       iounmap(host_set->mmio_base);
        kfree(host_set);
 
        if (have_msi)
@@ -1106,7 +1097,6 @@ static int __init ahci_init(void)
        return pci_module_init(&ahci_pci_driver);
 }
 
-
 static void __exit ahci_exit(void)
 {
        pci_unregister_driver(&ahci_pci_driver);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to