summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-ingenic.c
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2018-08-21 19:42:31 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-08-29 14:36:23 +0300
commit4717b11f80cf81b069f76e6225dc1caf194e1a58 (patch)
tree50f8d9f80c8ac53e883a419af83e3457b92181f7 /drivers/pinctrl/pinctrl-ingenic.c
parent556a36a71ed80e17ade49225b58513ea3c9e4558 (diff)
downloadlinux-4717b11f80cf81b069f76e6225dc1caf194e1a58.tar.xz
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: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-ingenic.c')
-rw-r--r--drivers/pinctrl/pinctrl-ingenic.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
index 4bceae88d056..1d6d7c6aecfc 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -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 ingenic_pinctrl *jzpc;
@@ -837,14 +837,13 @@ static struct platform_driver ingenic_pinctrl_driver = {
.driver = {
.name = "pinctrl-ingenic",
.of_match_table = of_match_ptr(ingenic_pinctrl_of_match),
- .suppress_bind_attrs = true,
},
- .probe = ingenic_pinctrl_probe,
.id_table = ingenic_pinctrl_ids,
};
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);