mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 23:14:31 +08:00
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>
This commit is contained in:
parent
cae5c82022
commit
fbd130887a
@ -1074,23 +1074,7 @@ static int init_irq (ide_hwif_t *hwif)
|
|||||||
mutex_unlock(&ide_cfg_mtx);
|
mutex_unlock(&ide_cfg_mtx);
|
||||||
return 0;
|
return 0;
|
||||||
out_unlink:
|
out_unlink:
|
||||||
spin_lock_irq(&ide_lock);
|
ide_remove_port_from_hwgroup(hwif);
|
||||||
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);
|
|
||||||
out_up:
|
out_up:
|
||||||
mutex_unlock(&ide_cfg_mtx);
|
mutex_unlock(&ide_cfg_mtx);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -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;
|
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;
|
ide_hwgroup_t *hwgroup = hwif->hwgroup;
|
||||||
|
|
||||||
|
@ -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) {}
|
static inline void ide_acpi_set_state(ide_hwif_t *hwif, int on) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void ide_remove_port_from_hwgroup(ide_hwif_t *);
|
||||||
extern int ide_hwif_request_regions(ide_hwif_t *hwif);
|
extern int ide_hwif_request_regions(ide_hwif_t *hwif);
|
||||||
extern void ide_hwif_release_regions(ide_hwif_t* hwif);
|
extern void ide_hwif_release_regions(ide_hwif_t* hwif);
|
||||||
extern void ide_unregister (unsigned int index);
|
extern void ide_unregister (unsigned int index);
|
||||||
|
Loading…
Reference in New Issue
Block a user