提交 40ee6fce 编写于 作者: L Laurent Pinchart 提交者: Simon Horman

sh-pfc: Split platform device and platform driver registration

Move platform driver registration to a static postcore initcall. This
prepares the move of platform device registration to arch code.
Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: NPaul Mundt <lethal@linux-sh.org>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
上级 4aeacd5b
......@@ -573,19 +573,16 @@ static struct platform_device sh_pfc_device = {
int __init register_sh_pfc(struct sh_pfc_platform_data *pdata)
{
int rc;
sh_pfc_device.dev.platform_data = pdata;
rc = platform_driver_register(&sh_pfc_driver);
if (likely(!rc)) {
rc = platform_device_register(&sh_pfc_device);
if (unlikely(rc))
platform_driver_unregister(&sh_pfc_driver);
}
return platform_device_register(&sh_pfc_device);
}
return rc;
static int __init sh_pfc_init(void)
{
return platform_driver_register(&sh_pfc_driver);
}
postcore_initcall(sh_pfc_init);
static void __exit sh_pfc_exit(void)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册