ide: sanitize ide_unregister() usage

* Remove ide_unregister() call from ide_exit()
  (host drivers take care of unregistering hwif-s themselves).

* Remove ide_unregister() call from probe methods of
  bast-ide, palm_bk3710, ide-cs and delkin_cb host drivers
  (ide_find_port() returns only free ide_hwifs[] entries).
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 16019c35
...@@ -49,11 +49,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq) ...@@ -49,11 +49,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
i = hwif->index; i = hwif->index;
if (hwif->present) ide_init_port_data(hwif, i);
ide_unregister(i);
else
ide_init_port_data(hwif, i);
ide_init_port_hw(hwif, &hw); ide_init_port_hw(hwif, &hw);
hwif->port_ops = NULL; hwif->port_ops = NULL;
......
...@@ -398,11 +398,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev) ...@@ -398,11 +398,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
i = hwif->index; i = hwif->index;
if (hwif->present) ide_init_port_data(hwif, i);
ide_unregister(i);
else
ide_init_port_data(hwif, i);
ide_init_port_hw(hwif, &hw); ide_init_port_hw(hwif, &hw);
hwif->mmio = 1; hwif->mmio = 1;
......
...@@ -1349,11 +1349,6 @@ int __init init_module (void) ...@@ -1349,11 +1349,6 @@ int __init init_module (void)
void __exit cleanup_module (void) void __exit cleanup_module (void)
{ {
int index;
for (index = 0; index < MAX_HWIFS; ++index)
ide_unregister(index);
proc_ide_destroy(); proc_ide_destroy();
class_destroy(ide_port_class); class_destroy(ide_port_class);
......
...@@ -183,11 +183,7 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl, ...@@ -183,11 +183,7 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl,
i = hwif->index; i = hwif->index;
if (hwif->present) ide_init_port_data(hwif, i);
ide_unregister(i);
else
ide_init_port_data(hwif, i);
ide_init_port_hw(hwif, &hw); ide_init_port_hw(hwif, &hw);
hwif->port_ops = &idecs_port_ops; hwif->port_ops = &idecs_port_ops;
......
...@@ -87,11 +87,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id) ...@@ -87,11 +87,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
i = hwif->index; i = hwif->index;
if (hwif->present) ide_init_port_data(hwif, i);
ide_unregister(i);
else
ide_init_port_data(hwif, i);
ide_init_port_hw(hwif, &hw); ide_init_port_hw(hwif, &hw);
hwif->port_ops = &delkin_cb_port_ops; hwif->port_ops = &delkin_cb_port_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment