ide: fix ide_unregister() usage in host drivers
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 2 Feb 2008 18:56:39 +0000 (19:56 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sat, 2 Feb 2008 18:56:39 +0000 (19:56 +0100)
bast-ide.c/ide-cs.c/delkin_cb.c:

* Don't set 'restore' flag for ide_unregister() when initializing new
  interface.

rapide.c/ide-pnp.c/ide-cs.c/ide_platform.c/au1xxx-ide.c/delkin_cb.c/scc_pata.c:

* Don't set 'init_default' and 'restore' flags for ide_unregister() when
  removing interface.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/arm/bast-ide.c
drivers/ide/arm/rapide.c
drivers/ide/ide-pnp.c
drivers/ide/legacy/ide-cs.c
drivers/ide/legacy/ide_platform.c
drivers/ide/mips/au1xxx-ide.c
drivers/ide/pci/delkin_cb.c
drivers/ide/pci/scc_pata.c

index 2864f5a..0e7574c 100644 (file)
@@ -53,7 +53,7 @@ bastide_register(unsigned int base, unsigned int aux, int irq,
        i = hwif->index;
 
        if (hwif->present)
-               ide_unregister(i, 0, 1);
+               ide_unregister(i, 0, 0);
        else if (!hwif->hold)
                ide_init_port_data(hwif, i);
 
index 823d333..efba00d 100644 (file)
@@ -76,7 +76,7 @@ static void __devexit rapide_remove(struct expansion_card *ec)
 
        ecard_set_drvdata(ec, NULL);
 
-       ide_unregister(hwif->index, 1, 1);
+       ide_unregister(hwif->index, 0, 0);
 
        ecard_release_resources(ec);
 }
index a766bdb..b163b2e 100644 (file)
@@ -62,7 +62,7 @@ static void idepnp_remove(struct pnp_dev * dev)
        ide_hwif_t *hwif = pnp_get_drvdata(dev);
 
        if (hwif)
-               ide_unregister(hwif->index, 1, 1);
+               ide_unregister(hwif->index, 0, 0);
        else
                printk(KERN_ERR "idepnp: Unable to remove device, please report.\n");
 }
index 38e87ad..7c4aa6c 100644 (file)
@@ -163,7 +163,7 @@ static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq
     i = hwif->index;
 
     if (hwif->present)
-       ide_unregister(i, 0, 1);
+       ide_unregister(i, 0, 0);
     else if (!hwif->hold)
        ide_init_port_data(hwif, i);
 
@@ -360,7 +360,7 @@ void ide_release(struct pcmcia_device *link)
     if (info->ndev) {
        /* FIXME: if this fails we need to queue the cleanup somehow
           -- need to investigate the required PCMCIA magic */
-       ide_unregister(info->hd, 1, 1);
+       ide_unregister(info->hd, 0, 0);
     }
     info->ndev = 0;
 
index c0dd67f..26c82ce 100644 (file)
@@ -122,7 +122,7 @@ static int __devexit plat_ide_remove(struct platform_device *pdev)
 {
        ide_hwif_t *hwif = pdev->dev.driver_data;
 
-       ide_unregister(hwif->index, 1, 1);
+       ide_unregister(hwif->index, 0, 0);
 
        return 0;
 }
index 66a675a..484a928 100644 (file)
@@ -678,7 +678,7 @@ static int au_ide_remove(struct device *dev)
        ide_hwif_t *hwif = dev_get_drvdata(dev);
        _auide_hwif *ahwif = &auide_hwif;
 
-       ide_unregister(hwif->index, 1, 1);
+       ide_unregister(hwif->index, 0, 0);
 
        iounmap((void *)ahwif->regbase);
 
index 1567080..3f9cd64 100644 (file)
@@ -85,7 +85,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
        i = hwif->index;
 
        if (hwif->present)
-               ide_unregister(i, 0, 1);
+               ide_unregister(i, 0, 0);
        else if (!hwif->hold)
                ide_init_port_data(hwif, i);
 
@@ -120,7 +120,7 @@ delkin_cb_remove (struct pci_dev *dev)
        ide_hwif_t *hwif = pci_get_drvdata(dev);
 
        if (hwif)
-               ide_unregister(hwif->index, 1, 1);
+               ide_unregister(hwif->index, 0, 0);
 
        pci_disable_device(dev);
 }
index 7e52a55..238e3e1 100644 (file)
@@ -736,7 +736,7 @@ static void __devexit scc_remove(struct pci_dev *dev)
                hwif->dmatable_cpu = NULL;
        }
 
-       ide_unregister(hwif->index, 1, 1);
+       ide_unregister(hwif->index, 0, 0);
 
        hwif->chipset = ide_unknown;
        iounmap((void*)ports->dma);