diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 46a2d4ca812b..5bc2e4782a55 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -175,10 +175,6 @@ EXPORT_SYMBOL_GPL(ide_port_unregister_devices); | |||
175 | 175 | ||
176 | void ide_unregister(ide_hwif_t *hwif) | 176 | void ide_unregister(ide_hwif_t *hwif) |
177 | { | 177 | { |
178 | ide_hwif_t *g; | ||
179 | ide_hwgroup_t *hwgroup; | ||
180 | int irq_count = 0; | ||
181 | |||
182 | BUG_ON(in_interrupt()); | 178 | BUG_ON(in_interrupt()); |
183 | BUG_ON(irqs_disabled()); | 179 | BUG_ON(irqs_disabled()); |
184 | 180 | ||
@@ -191,18 +187,7 @@ void ide_unregister(ide_hwif_t *hwif) | |||
191 | 187 | ||
192 | ide_proc_unregister_port(hwif); | 188 | ide_proc_unregister_port(hwif); |
193 | 189 | ||
194 | hwgroup = hwif->hwgroup; | 190 | free_irq(hwif->irq, hwif); |
195 | /* | ||
196 | * free the irq if we were the only hwif using it | ||
197 | */ | ||
198 | g = hwgroup->hwif; | ||
199 | do { | ||
200 | if (g->irq == hwif->irq) | ||
201 | ++irq_count; | ||
202 | g = g->next; | ||
203 | } while (g != hwgroup->hwif); | ||
204 | if (irq_count == 1) | ||
205 | free_irq(hwif->irq, hwgroup); | ||
206 | 191 | ||
207 | ide_remove_port_from_hwgroup(hwif); | 192 | ide_remove_port_from_hwgroup(hwif); |
208 | 193 | ||