diff options
author | Wolfram Sang <w.sang@pengutronix.de> | 2010-09-02 11:28:39 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-13 21:34:25 -0700 |
commit | dbee032295dac88742734ee9988e08a0e4f2f732 (patch) | |
tree | 75369269de5fe9362369592e8b4fe46be5340da8 | |
parent | cd078af65d5c2f19c0f378062b07a0a79b000723 (diff) | |
download | op-kernel-dev-dbee032295dac88742734ee9988e08a0e4f2f732.zip op-kernel-dev-dbee032295dac88742734ee9988e08a0e4f2f732.tar.gz |
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>
-rw-r--r-- | drivers/ide/ide-probe.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 4c3d1bfe..068cef0 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; |