From: Bartlomiej Zolnierkiewicz Date: Sat, 2 Feb 2008 18:56:39 +0000 (+0100) Subject: ide: fix ide_unregister() usage in host drivers X-Git-Tag: v2.6.25-rc1~1068^2~56 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=909f4369bca30f9a186316a3bf2b4a9c1e702a25;p=linux-2.6-omap-h63xx.git ide: fix ide_unregister() usage in host drivers 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 --- diff --git a/drivers/ide/arm/bast-ide.c b/drivers/ide/arm/bast-ide.c index 2864f5aca3f..0e7574c0ee6 100644 --- a/drivers/ide/arm/bast-ide.c +++ b/drivers/ide/arm/bast-ide.c @@ -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); diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c index 823d3331318..efba00d2fc3 100644 --- a/drivers/ide/arm/rapide.c +++ b/drivers/ide/arm/rapide.c @@ -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); } diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c index a766bdbbad3..b163b2e5221 100644 --- a/drivers/ide/ide-pnp.c +++ b/drivers/ide/ide-pnp.c @@ -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"); } diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index 38e87ad211e..7c4aa6c79a9 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c @@ -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; diff --git a/drivers/ide/legacy/ide_platform.c b/drivers/ide/legacy/ide_platform.c index c0dd67f4af3..26c82ce602d 100644 --- a/drivers/ide/legacy/ide_platform.c +++ b/drivers/ide/legacy/ide_platform.c @@ -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; } diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 66a675a10f1..484a9287bf8 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c @@ -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); diff --git a/drivers/ide/pci/delkin_cb.c b/drivers/ide/pci/delkin_cb.c index 15670801a67..3f9cd64c26a 100644 --- a/drivers/ide/pci/delkin_cb.c +++ b/drivers/ide/pci/delkin_cb.c @@ -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); } diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 7e52a55c86c..238e3e181e8 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c @@ -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);