aboutsummaryrefslogtreecommitdiffstats
path: root/net/iucv
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2008-04-10 05:12:45 -0400
committerDavid S. Miller <davem@davemloft.net>2008-04-10 05:12:45 -0400
commit2d7bf36746b6329d9d54c6c6efe2b55666dd1f53 (patch)
treeff6c1608560d704622ba1e3400fcbbb96a3151a4 /net/iucv
parent9284d6c704b5cfc7f2eb44f81255b4762bcfe4c5 (diff)
iucv: Delay bus registration until core is ready.
If we register the iucv bus after the infrastructure is ready, userspace can start relying on it when it receives the uevent for the bus. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/iucv')
-rw-r--r--net/iucv/iucv.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c
index a65e69eaea2f..918970762131 100644
--- a/net/iucv/iucv.c
+++ b/net/iucv/iucv.c
@@ -1608,13 +1608,10 @@ static int __init iucv_init(void)
1608 rc = register_external_interrupt(0x4000, iucv_external_interrupt); 1608 rc = register_external_interrupt(0x4000, iucv_external_interrupt);
1609 if (rc) 1609 if (rc)
1610 goto out; 1610 goto out;
1611 rc = bus_register(&iucv_bus);
1612 if (rc)
1613 goto out_int;
1614 iucv_root = s390_root_dev_register("iucv"); 1611 iucv_root = s390_root_dev_register("iucv");
1615 if (IS_ERR(iucv_root)) { 1612 if (IS_ERR(iucv_root)) {
1616 rc = PTR_ERR(iucv_root); 1613 rc = PTR_ERR(iucv_root);
1617 goto out_bus; 1614 goto out_int;
1618 } 1615 }
1619 1616
1620 for_each_online_cpu(cpu) { 1617 for_each_online_cpu(cpu) {
@@ -1634,13 +1631,20 @@ static int __init iucv_init(void)
1634 goto out_free; 1631 goto out_free;
1635 } 1632 }
1636 } 1633 }
1637 register_hotcpu_notifier(&iucv_cpu_notifier); 1634 rc = register_hotcpu_notifier(&iucv_cpu_notifier);
1635 if (rc)
1636 goto out_free;
1638 ASCEBC(iucv_error_no_listener, 16); 1637 ASCEBC(iucv_error_no_listener, 16);
1639 ASCEBC(iucv_error_no_memory, 16); 1638 ASCEBC(iucv_error_no_memory, 16);
1640 ASCEBC(iucv_error_pathid, 16); 1639 ASCEBC(iucv_error_pathid, 16);
1641 iucv_available = 1; 1640 iucv_available = 1;
1641 rc = bus_register(&iucv_bus);
1642 if (rc)
1643 goto out_cpu;
1642 return 0; 1644 return 0;
1643 1645
1646out_cpu:
1647 unregister_hotcpu_notifier(&iucv_cpu_notifier);
1644out_free: 1648out_free:
1645 for_each_possible_cpu(cpu) { 1649 for_each_possible_cpu(cpu) {
1646 kfree(iucv_param[cpu]); 1650 kfree(iucv_param[cpu]);
@@ -1649,8 +1653,6 @@ out_free:
1649 iucv_irq_data[cpu] = NULL; 1653 iucv_irq_data[cpu] = NULL;
1650 } 1654 }
1651 s390_root_dev_unregister(iucv_root); 1655 s390_root_dev_unregister(iucv_root);
1652out_bus:
1653 bus_unregister(&iucv_bus);
1654out_int: 1656out_int:
1655 unregister_external_interrupt(0x4000, iucv_external_interrupt); 1657 unregister_external_interrupt(0x4000, iucv_external_interrupt);
1656out: 1658out: