Skip to content

Commit

Permalink
powerpc/mpic: create mpic subsystem object
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dongsheng.wang@freescale.com authored and Scott Wood committed Jul 1, 2013
1 parent 36ca09b commit 9e6f31a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/powerpc/include/asm/mpic.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ struct mpic
#endif
};

extern struct bus_type mpic_subsys;

/*
* MPIC flags (passed to mpic_alloc)
*
Expand Down
8 changes: 8 additions & 0 deletions arch/powerpc/sysdev/mpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
#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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 9e6f31a

Please sign in to comment.