pinctrl: ocelot: allow building as a module
authorClément Léger <clement.leger@bootlin.com>
Fri, 17 Jun 2022 10:35:48 +0000 (12:35 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 28 Jun 2022 07:18:08 +0000 (09:18 +0200)
Set PINCTRL_OCELOT config option as a tristate and add
MODULE_DEVICE_TABLE()/MODULE_LICENSE() to export appropriate
information. Moreover, switch from builtin_platform_driver()
to module_platform_driver().

Signed-off-by: Clément Léger <clement.leger@bootlin.com>
Link: https://lore.kernel.org/r/20220617103548.490092-1-clement.leger@bootlin.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/Kconfig
drivers/pinctrl/pinctrl-ocelot.c

index f52960d2dfbe8e060468ea79bd8b709b2570991f..257b067527478cd4ac966c0f32b27e2d8fdc33e5 100644 (file)
@@ -311,7 +311,7 @@ config PINCTRL_MICROCHIP_SGPIO
          LED controller.
 
 config PINCTRL_OCELOT
-       bool "Pinctrl driver for the Microsemi Ocelot and Jaguar2 SoCs"
+       tristate "Pinctrl driver for the Microsemi Ocelot and Jaguar2 SoCs"
        depends on OF
        depends on HAS_IOMEM
        select GPIOLIB
index 5f4a8c5c66508ac6bf96789403e7dd1f061a2cf3..349e063a04fac1cf014918277bc0b6ae4247b233 100644 (file)
@@ -1889,6 +1889,7 @@ static const struct of_device_id ocelot_pinctrl_of_match[] = {
        { .compatible = "microchip,lan966x-pinctrl", .data = &lan966x_desc },
        {},
 };
+MODULE_DEVICE_TABLE(of, ocelot_pinctrl_of_match);
 
 static struct regmap *ocelot_pinctrl_create_pincfg(struct platform_device *pdev)
 {
@@ -1984,4 +1985,5 @@ static struct platform_driver ocelot_pinctrl_driver = {
        },
        .probe = ocelot_pinctrl_probe,
 };
-builtin_platform_driver(ocelot_pinctrl_driver);
+module_platform_driver(ocelot_pinctrl_driver);
+MODULE_LICENSE("Dual MIT/GPL");