aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-probe.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index dea314ce33d3..f3ee098b69c7 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -949,6 +949,7 @@ static void ide_port_setup_devices(ide_hwif_t *hwif)
949{ 949{
950 int i; 950 int i;
951 951
952 mutex_lock(&ide_cfg_mtx);
952 for (i = 0; i < MAX_DRIVES; i++) { 953 for (i = 0; i < MAX_DRIVES; i++) {
953 ide_drive_t *drive = &hwif->drives[i]; 954 ide_drive_t *drive = &hwif->drives[i];
954 955
@@ -963,6 +964,7 @@ static void ide_port_setup_devices(ide_hwif_t *hwif)
963 964
964 ide_add_drive_to_hwgroup(drive); 965 ide_add_drive_to_hwgroup(drive);
965 } 966 }
967 mutex_unlock(&ide_cfg_mtx);
966} 968}
967 969
968/* 970/*
@@ -1088,8 +1090,6 @@ static int init_irq (ide_hwif_t *hwif)
1088 hwif->sharing_irq ? "shar" : "serializ", match->name); 1090 hwif->sharing_irq ? "shar" : "serializ", match->name);
1089 printk("\n"); 1091 printk("\n");
1090 1092
1091 ide_port_setup_devices(hwif);
1092
1093 mutex_unlock(&ide_cfg_mtx); 1093 mutex_unlock(&ide_cfg_mtx);
1094 return 0; 1094 return 0;
1095out_unlink: 1095out_unlink:
@@ -1447,6 +1447,8 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
1447 continue; 1447 continue;
1448 } 1448 }
1449 1449
1450 ide_port_setup_devices(hwif);
1451
1450 ide_acpi_init(hwif); 1452 ide_acpi_init(hwif);
1451 ide_acpi_port_init_devices(hwif); 1453 ide_acpi_port_init_devices(hwif);
1452 } 1454 }