ChangeSet 1.1558.2.3, 2005/03/07 02:28:34-05:00, [EMAIL PROTECTED]

        [libata] remove_one helper cleanup
        
        Sync with 2.6.x version by moving pci_release_regions() call
        to end of function, and declaring var 'ioaddr' only in the
        scope needed.



 libata-core.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)


diff -Nru a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
--- a/drivers/scsi/libata-core.c        2005-03-10 08:04:26 -08:00
+++ b/drivers/scsi/libata-core.c        2005-03-10 08:04:26 -08:00
@@ -3887,15 +3887,12 @@
        if (host_set->mmio_base)
                iounmap(host_set->mmio_base);
 
-       pci_release_regions(pdev);
-
        for (i = 0; i < host_set->n_ports; i++) {
-               struct ata_ioports *ioaddr;
-
                ap = host_set->ports[i];
-               ioaddr = &ap->ioaddr;
 
                if ((ap->flags & ATA_FLAG_NO_LEGACY) == 0) {
+                       struct ata_ioports *ioaddr = &ap->ioaddr;
+
                        if (ioaddr->cmd_addr == 0x1f0)
                                release_region(0x1f0, 8);
                        else if (ioaddr->cmd_addr == 0x170)
@@ -3904,6 +3901,8 @@
        }
 
        kfree(host_set);
+
+       pci_release_regions(pdev);
        pci_disable_device(pdev);
        dev_set_drvdata(dev, NULL);
 }
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-24" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to