提交 dbee0322 编写于 作者: W Wolfram Sang 提交者: David S. Miller

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: NWolfram Sang <w.sang@pengutronix.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cd078af6
...@@ -1444,14 +1444,6 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, ...@@ -1444,14 +1444,6 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
ide_acpi_port_init_devices(hwif); ide_acpi_port_init_devices(hwif);
} }
ide_host_for_each_port(i, hwif, host) {
if (hwif == NULL)
continue;
if (hwif->present)
hwif_register_devices(hwif);
}
ide_host_for_each_port(i, hwif, host) { ide_host_for_each_port(i, hwif, host) {
if (hwif == NULL) if (hwif == NULL)
continue; continue;
...@@ -1459,8 +1451,10 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, ...@@ -1459,8 +1451,10 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d,
ide_sysfs_register_port(hwif); ide_sysfs_register_port(hwif);
ide_proc_register_port(hwif); ide_proc_register_port(hwif);
if (hwif->present) if (hwif->present) {
ide_proc_port_register_devices(hwif); ide_proc_port_register_devices(hwif);
hwif_register_devices(hwif);
}
} }
return j ? 0 : -1; return j ? 0 : -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册