summaryrefslogtreecommitdiff
path: root/drivers/ide
diff options
context:
space:
mode:
authorWolfram Sang <w.sang@pengutronix.de>2010-09-02 11:28:39 +0000
committerDavid S. Miller <davem@davemloft.net>2010-09-13 21:34:25 -0700
commitdbee032295dac88742734ee9988e08a0e4f2f732 (patch)
tree75369269de5fe9362369592e8b4fe46be5340da8 /drivers/ide
parentcd078af65d5c2f19c0f378062b07a0a79b000723 (diff)
ide: Fix ordering of procfs registry.
We must ensure that ide_proc_port_register_devices() occurs on an interface before ide_proc_register_driver() executes for that interfaces drives. Therefore defer the registry of the driver device objects backed by ide_bus_type until after ide_proc_port_register_devices() has run and thus all of the drive->proc procfs directory pointers have been setup. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-probe.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 4c3d1bfec0c..068cef0a987 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1448,19 +1448,13 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
if (hwif == NULL)
continue;
- if (hwif->present)
- hwif_register_devices(hwif);
- }
-
- ide_host_for_each_port(i, hwif, host) {
- if (hwif == NULL)
- continue;
-
ide_sysfs_register_port(hwif);
ide_proc_register_port(hwif);
- if (hwif->present)
+ if (hwif->present) {
ide_proc_port_register_devices(hwif);
+ hwif_register_devices(hwif);
+ }
}
return j ? 0 : -1;