aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:36 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:36 -0500
commitfbd130887a45341259cde02e134581fb3dac6e14 (patch)
treef0725b5febce2f948e02f5d98a5bf3a6a7f658cb
parentcae5c82022cd710ff1eedd39ca8c56b081177b18 (diff)
ide: use ide_remove_port_from_hwgroup in init_irq()
There should be no functionality changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/ide-probe.c18
-rw-r--r--drivers/ide/ide.c2
-rw-r--r--include/linux/ide.h1
3 files changed, 3 insertions, 18 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 88c77d63c01f..3acb1b692f8c 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1074,23 +1074,7 @@ static int init_irq (ide_hwif_t *hwif)
1074 mutex_unlock(&ide_cfg_mtx); 1074 mutex_unlock(&ide_cfg_mtx);
1075 return 0; 1075 return 0;
1076out_unlink: 1076out_unlink:
1077 spin_lock_irq(&ide_lock); 1077 ide_remove_port_from_hwgroup(hwif);
1078 if (hwif->next == hwif) {
1079 BUG_ON(hwgroup->hwif != hwif);
1080 kfree(hwgroup);
1081 } else {
1082 ide_hwif_t *g;
1083 g = hwgroup->hwif;
1084 while (g->next != hwif)
1085 g = g->next;
1086 g->next = hwif->next;
1087 if (hwgroup->hwif == hwif) {
1088 BUG_ON(hwgroup->drive);
1089 hwgroup->hwif = g;
1090 }
1091 BUG_ON(hwgroup->hwif == hwif);
1092 }
1093 spin_unlock_irq(&ide_lock);
1094out_up: 1078out_up:
1095 mutex_unlock(&ide_cfg_mtx); 1079 mutex_unlock(&ide_cfg_mtx);
1096 return 1; 1080 return 1;
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 1a3c89471175..ab9ca2b5b66c 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -461,7 +461,7 @@ static void ide_hwif_restore(ide_hwif_t *hwif, ide_hwif_t *tmp_hwif)
461 hwif->hwif_data = tmp_hwif->hwif_data; 461 hwif->hwif_data = tmp_hwif->hwif_data;
462} 462}
463 463
464static void ide_remove_port_from_hwgroup(ide_hwif_t *hwif) 464void ide_remove_port_from_hwgroup(ide_hwif_t *hwif)
465{ 465{
466 ide_hwgroup_t *hwgroup = hwif->hwgroup; 466 ide_hwgroup_t *hwgroup = hwif->hwgroup;
467 467
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 4d8c12cc55ea..ec10b2a3bb6e 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1191,6 +1191,7 @@ static inline void ide_acpi_init(ide_hwif_t *hwif) { ; }
1191static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {} 1191static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {}
1192#endif 1192#endif
1193 1193
1194void ide_remove_port_from_hwgroup(ide_hwif_t *);
1194extern int ide_hwif_request_regions(ide_hwif_t *hwif); 1195extern int ide_hwif_request_regions(ide_hwif_t *hwif);
1195extern void ide_hwif_release_regions(ide_hwif_t* hwif); 1196extern void ide_hwif_release_regions(ide_hwif_t* hwif);
1196extern void ide_unregister (unsigned int index); 1197extern void ide_unregister (unsigned int index);