powerpc/mpic: create mpic subsystem object
authorDongsheng.wang@freescale.com <Dongsheng.wang@freescale.com>
Tue, 9 Apr 2013 02:22:31 +0000 (10:22 +0800)
committerScott Wood <scottwood@freescale.com>
Mon, 1 Jul 2013 23:38:42 +0000 (18:38 -0500)
Register a mpic subsystem at /sys/devices/system/

Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/include/asm/mpic.h
arch/powerpc/sysdev/mpic.c

index ea6bf72..4a1ac9f 100644 (file)
@@ -339,6 +339,8 @@ struct mpic
 #endif
 };
 
+extern struct bus_type mpic_subsys;
+
 /*
  * MPIC flags (passed to mpic_alloc)
  *
index 4635d11..1be54fa 100644 (file)
 #define DBG(fmt...)
 #endif
 
+struct bus_type mpic_subsys = {
+       .name = "mpic",
+       .dev_name = "mpic",
+};
+EXPORT_SYMBOL_GPL(mpic_subsys);
+
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
 static DEFINE_RAW_SPINLOCK(mpic_lock);
@@ -2035,6 +2041,8 @@ static struct syscore_ops mpic_syscore_ops = {
 static int mpic_init_sys(void)
 {
        register_syscore_ops(&mpic_syscore_ops);
+       subsys_system_register(&mpic_subsys, NULL);
+
        return 0;
 }