]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ide: sanitize ide_unregister() usage
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 27 Apr 2008 13:38:31 +0000 (15:38 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Sun, 27 Apr 2008 13:38:31 +0000 (15:38 +0200)
* 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: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/arm/bast-ide.c
drivers/ide/arm/palm_bk3710.c
drivers/ide/ide.c
drivers/ide/legacy/ide-cs.c
drivers/ide/pci/delkin_cb.c

index d158f579bde23d7eb4786ab2c1077928bf131a46..df09f03726051ff0168d6a118fa4b7b61e166e4b 100644 (file)
@@ -49,11 +49,7 @@ static int __init bastide_register(unsigned int base, unsigned int aux, int irq)
 
        i = hwif->index;
 
-       if (hwif->present)
-               ide_unregister(i);
-       else
-               ide_init_port_data(hwif, i);
-
+       ide_init_port_data(hwif, i);
        ide_init_port_hw(hwif, &hw);
        hwif->port_ops = NULL;
 
index 8fa34e26443abbab9023ffaa548fc6ce33897a33..208d7f2d6d10ff9978882a2b35401ebfcdc8b903 100644 (file)
@@ -398,11 +398,7 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
 
        i = hwif->index;
 
-       if (hwif->present)
-               ide_unregister(i);
-       else
-               ide_init_port_data(hwif, i);
-
+       ide_init_port_data(hwif, i);
        ide_init_port_hw(hwif, &hw);
 
        hwif->mmio = 1;
index 78e49e8461a20cb37515879fc0f9c8517c577821..53c6a038e1790b589a1addab02029dadc2919d07 100644 (file)
@@ -1349,11 +1349,6 @@ int __init init_module (void)
 
 void __exit cleanup_module (void)
 {
-       int index;
-
-       for (index = 0; index < MAX_HWIFS; ++index)
-               ide_unregister(index);
-
        proc_ide_destroy();
 
        class_destroy(ide_port_class);
index 855e157b18d3fab87a3f8faa956cbdbe4f4ca029..867fe14e5de3a93fe738bce06471e5516919da4c 100644 (file)
@@ -183,11 +183,7 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl,
 
     i = hwif->index;
 
-    if (hwif->present)
-       ide_unregister(i);
-    else
-       ide_init_port_data(hwif, i);
-
+    ide_init_port_data(hwif, i);
     ide_init_port_hw(hwif, &hw);
     hwif->port_ops = &idecs_port_ops;
 
index c7b7e0483287b8747affd5dff58b6d91b4d23cf4..7b0ab178459cf4b7ac3646db74d06e19fc75b246 100644 (file)
@@ -87,11 +87,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
 
        i = hwif->index;
 
-       if (hwif->present)
-               ide_unregister(i);
-       else
-               ide_init_port_data(hwif, i);
-
+       ide_init_port_data(hwif, i);
        ide_init_port_hw(hwif, &hw);
        hwif->port_ops = &delkin_cb_port_ops;