提交 15cf6475 编写于 作者: P Paul Mundt

Merge branch 'common/pinctrl' into sh-latest

...@@ -325,20 +325,6 @@ static struct pinctrl_desc sh_pfc_pinctrl_desc = { ...@@ -325,20 +325,6 @@ static struct pinctrl_desc sh_pfc_pinctrl_desc = {
.confops = &sh_pfc_pinconf_ops, .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, static inline void __devinit sh_pfc_map_one_gpio(struct sh_pfc *pfc,
struct sh_pfc_pinctrl *pmx, struct sh_pfc_pinctrl *pmx,
struct pinmux_gpio *gpio, struct pinmux_gpio *gpio,
...@@ -505,7 +491,7 @@ static struct platform_device sh_pfc_pinctrl_device = { ...@@ -505,7 +491,7 @@ static struct platform_device sh_pfc_pinctrl_device = {
.id = -1, .id = -1,
}; };
static int __init sh_pfc_pinctrl_init(void) static int sh_pfc_pinctrl_init(void)
{ {
int rc; int rc;
...@@ -519,10 +505,22 @@ static int __init sh_pfc_pinctrl_init(void) ...@@ -519,10 +505,22 @@ static int __init sh_pfc_pinctrl_init(void)
return rc; 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) static void __exit sh_pfc_pinctrl_exit(void)
{ {
platform_driver_unregister(&sh_pfc_pinctrl_driver); platform_driver_unregister(&sh_pfc_pinctrl_driver);
} }
subsys_initcall(sh_pfc_pinctrl_init);
module_exit(sh_pfc_pinctrl_exit); module_exit(sh_pfc_pinctrl_exit);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册