]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ide: use ide_remove_port_from_hwgroup in init_irq()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 1 Feb 2008 22:09:36 +0000 (23:09 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 1 Feb 2008 22:09:36 +0000 (23:09 +0100)
There should be no functionality changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-probe.c
drivers/ide/ide.c
include/linux/ide.h

index 88c77d63c01f86b56e629985434563d09536aaee..3acb1b692f8ce6870d9b7698b945136e39878dd0 100644 (file)
@@ -1074,23 +1074,7 @@ static int init_irq (ide_hwif_t *hwif)
        mutex_unlock(&ide_cfg_mtx);
        return 0;
 out_unlink:
-       spin_lock_irq(&ide_lock);
-       if (hwif->next == hwif) {
-               BUG_ON(hwgroup->hwif != hwif);
-               kfree(hwgroup);
-       } else {
-               ide_hwif_t *g;
-               g = hwgroup->hwif;
-               while (g->next != hwif)
-                       g = g->next;
-               g->next = hwif->next;
-               if (hwgroup->hwif == hwif) {
-                       BUG_ON(hwgroup->drive);
-                       hwgroup->hwif = g;
-               }
-               BUG_ON(hwgroup->hwif == hwif);
-       }
-       spin_unlock_irq(&ide_lock);
+       ide_remove_port_from_hwgroup(hwif);
 out_up:
        mutex_unlock(&ide_cfg_mtx);
        return 1;
index 1a3c894711754b438f645b5dd59945bbc8e4b26c..ab9ca2b5b66cdd25d6e6d60a6559f8823cee47b1 100644 (file)
@@ -461,7 +461,7 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
        hwif->hwif_data                 = tmp_hwif->hwif_data;
 }
 
-static void ide_remove_port_from_hwgroup(ide_hwif_t *hwif)
+void ide_remove_port_from_hwgroup(ide_hwif_t *hwif)
 {
        ide_hwgroup_t *hwgroup = hwif->hwgroup;
 
index 4d8c12cc55ea1acf55abdaaf8ed457e9960bb750..ec10b2a3bb6ec15e43dae0989062a27838278e0f 100644 (file)
@@ -1191,6 +1191,7 @@ static inline void ide_acpi_init(ide_hwif_t *hwif) { ; }
 static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {}
 #endif
 
+void ide_remove_port_from_hwgroup(ide_hwif_t *);
 extern int ide_hwif_request_regions(ide_hwif_t *hwif);
 extern void ide_hwif_release_regions(ide_hwif_t* hwif);
 extern void ide_unregister (unsigned int index);