diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-08-01 16:28:37 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-08-01 16:28:37 +0900 |
commit | 15cf647512529c69f8988b224337f13c8ca9e49d (patch) | |
tree | c4369896b3ce46ad317eb3ca5f91f1239b0aed3b /drivers | |
parent | 91ba548cfd5cc8ee93b9435527efb8fa4caf5c5e (diff) | |
parent | 1e32dfe323d156d5d7b25b9feffe015d19713db2 (diff) | |
download | lwn-15cf647512529c69f8988b224337f13c8ca9e49d.tar.gz lwn-15cf647512529c69f8988b224337f13c8ca9e49d.zip |
Merge branch 'common/pinctrl' into sh-latest
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/sh/pfc/pinctrl.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/drivers/sh/pfc/pinctrl.c b/drivers/sh/pfc/pinctrl.c index 814b29255aef..2804eaae804e 100644 --- a/drivers/sh/pfc/pinctrl.c +++ b/drivers/sh/pfc/pinctrl.c @@ -325,20 +325,6 @@ static struct pinctrl_desc sh_pfc_pinctrl_desc = { .confops = &sh_pfc_pinconf_ops, }; -int sh_pfc_register_pinctrl(struct sh_pfc *pfc) -{ - sh_pfc_pmx = kzalloc(sizeof(struct sh_pfc_pinctrl), GFP_KERNEL); - if (unlikely(!sh_pfc_pmx)) - return -ENOMEM; - - spin_lock_init(&sh_pfc_pmx->lock); - - sh_pfc_pmx->pfc = pfc; - - return 0; -} -EXPORT_SYMBOL_GPL(sh_pfc_register_pinctrl); - static inline void __devinit sh_pfc_map_one_gpio(struct sh_pfc *pfc, struct sh_pfc_pinctrl *pmx, struct pinmux_gpio *gpio, @@ -505,7 +491,7 @@ static struct platform_device sh_pfc_pinctrl_device = { .id = -1, }; -static int __init sh_pfc_pinctrl_init(void) +static int sh_pfc_pinctrl_init(void) { int rc; @@ -519,10 +505,22 @@ static int __init sh_pfc_pinctrl_init(void) return rc; } +int sh_pfc_register_pinctrl(struct sh_pfc *pfc) +{ + sh_pfc_pmx = kzalloc(sizeof(struct sh_pfc_pinctrl), GFP_KERNEL); + if (unlikely(!sh_pfc_pmx)) + return -ENOMEM; + + spin_lock_init(&sh_pfc_pmx->lock); + + sh_pfc_pmx->pfc = pfc; + + return sh_pfc_pinctrl_init(); +} +EXPORT_SYMBOL_GPL(sh_pfc_register_pinctrl); + static void __exit sh_pfc_pinctrl_exit(void) { platform_driver_unregister(&sh_pfc_pinctrl_driver); } - -subsys_initcall(sh_pfc_pinctrl_init); module_exit(sh_pfc_pinctrl_exit); |