Commit 4717b11f authored by Paul Cercueil's avatar Paul Cercueil Committed by Linus Walleij

pinctrl: ingenic: Mark probe function as __init

By using platform_driver_probe() instead of platform_driver_register(),
we can mark the ingenic_pinctrl_probe() function as __init.
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 556a36a7
...@@ -717,7 +717,7 @@ static const struct of_device_id ingenic_pinctrl_of_match[] = { ...@@ -717,7 +717,7 @@ static const struct of_device_id ingenic_pinctrl_of_match[] = {
{}, {},
}; };
static int ingenic_pinctrl_probe(struct platform_device *pdev) static int __init ingenic_pinctrl_probe(struct platform_device *pdev)
{ {
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct ingenic_pinctrl *jzpc; struct ingenic_pinctrl *jzpc;
...@@ -837,14 +837,13 @@ static struct platform_driver ingenic_pinctrl_driver = { ...@@ -837,14 +837,13 @@ static struct platform_driver ingenic_pinctrl_driver = {
.driver = { .driver = {
.name = "pinctrl-ingenic", .name = "pinctrl-ingenic",
.of_match_table = of_match_ptr(ingenic_pinctrl_of_match), .of_match_table = of_match_ptr(ingenic_pinctrl_of_match),
.suppress_bind_attrs = true,
}, },
.probe = ingenic_pinctrl_probe,
.id_table = ingenic_pinctrl_ids, .id_table = ingenic_pinctrl_ids,
}; };
static int __init ingenic_pinctrl_drv_register(void) static int __init ingenic_pinctrl_drv_register(void)
{ {
return platform_driver_register(&ingenic_pinctrl_driver); return platform_driver_probe(&ingenic_pinctrl_driver,
ingenic_pinctrl_probe);
} }
subsys_initcall(ingenic_pinctrl_drv_register); subsys_initcall(ingenic_pinctrl_drv_register);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment