1
0
Fork 0

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 <bzolnier@gmail.com>
hifive-unleashed-5.1
Bartlomiej Zolnierkiewicz 2008-02-02 19:56:39 +01:00
parent 9e016a7192
commit 909f4369bc
8 changed files with 10 additions and 10 deletions

View 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);

View 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);
}

View 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");
}

View 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;

View 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;
}

View 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);

View 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);
}

View 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);