[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080208004516.17746.18498.sendpatchset@localhost.localdomain>
Date: Fri, 08 Feb 2008 01:45:16 +0100
From: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To: linux-ide@...r.kernel.org
Cc: linuxppc-dev@...abs.org,
Bartlomiej Zolnierkiewicz <bzolnier@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 08/18] ide: move ide_port_setup_devices() call to ide_device_add_all()
Add ide_cfg_mtx lock/unlock to ide_port_setup_devices() and then move
ide_port_setup_devices() call from init_irq() to ide_device_add_all().
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
---
drivers/ide/ide-probe.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
Index: b/drivers/ide/ide-probe.c
===================================================================
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -947,6 +947,7 @@ static void ide_port_setup_devices(ide_h
{
int i;
+ mutex_lock(&ide_cfg_mtx);
for (i = 0; i < MAX_DRIVES; i++) {
ide_drive_t *drive = &hwif->drives[i];
@@ -961,6 +962,7 @@ static void ide_port_setup_devices(ide_h
ide_add_drive_to_hwgroup(drive);
}
+ mutex_unlock(&ide_cfg_mtx);
}
/*
@@ -1086,8 +1088,6 @@ static int init_irq (ide_hwif_t *hwif)
hwif->sharing_irq ? "shar" : "serializ", match->name);
printk("\n");
- ide_port_setup_devices(hwif);
-
mutex_unlock(&ide_cfg_mtx);
return 0;
out_unlink:
@@ -1443,6 +1443,8 @@ int ide_device_add_all(u8 *idx, const st
continue;
}
+ ide_port_setup_devices(hwif);
+
ide_acpi_init(hwif);
ide_acpi_port_init_devices(hwif);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists