aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-07-14 03:41:08 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-16 07:04:45 -0400
commitf8be339c02c1e543eee8e09ffe600c0e61be5898 (patch)
tree9a51f8b7e0e584be9bc142c61ef6da39c7924182
parent4f0234f4f9da485ecb9729af1b88567700fd4767 (diff)
[SPARC64]: Unconditionally register vio_bus_type.
The VIO drivers register themselves unconditionally just like those of any other bus type, so to avoid crashes on non-VIO systems we need to always register vio_bus_type. Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--arch/sparc64/kernel/vio.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c
index 8b269aabff07..49569b44ea1f 100644
--- a/arch/sparc64/kernel/vio.c
+++ b/arch/sparc64/kernel/vio.c
@@ -335,6 +335,13 @@ static int __init vio_init(void)
335 int err, len; 335 int err, len;
336 u64 root; 336 u64 root;
337 337
338 err = bus_register(&vio_bus_type);
339 if (err) {
340 printk(KERN_ERR "VIO: Could not register bus type err=%d\n",
341 err);
342 return err;
343 }
344
338 hp = mdesc_grab(); 345 hp = mdesc_grab();
339 if (!hp) 346 if (!hp)
340 return 0; 347 return 0;
@@ -374,13 +381,6 @@ static int __init vio_init(void)
374 381
375 cdev_cfg_handle = *cfg_handle; 382 cdev_cfg_handle = *cfg_handle;
376 383
377 err = bus_register(&vio_bus_type);
378 if (err) {
379 printk(KERN_ERR "VIO: Could not register bus type err=%d\n",
380 err);
381 return err;
382 }
383
384 create_devices(hp, root); 384 create_devices(hp, root);
385 385
386 mdesc_release(hp); 386 mdesc_release(hp);