Skip to content

Commit 4434f4c

Browse files
ffainelliLinus Walleij
authored andcommitted
pinctrl: bcm2835: Allow building driver as a module
Update the pinctrl-bcm2835 driver to support being built as as a module by converting it to a module_platform_driver() with the appropriate module license, authors and description. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org> Link: https://lore.kernel.org/r/20211019221127.1953001-1-f.fainelli@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent 53b3947 commit 4434f4c

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

drivers/pinctrl/bcm/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ config PINCTRL_BCM281XX
1818
framework. GPIO is provided by a separate GPIO driver.
1919

2020
config PINCTRL_BCM2835
21-
bool "Broadcom BCM2835 GPIO (with PINCONF) driver"
21+
tristate "Broadcom BCM2835 GPIO (with PINCONF) driver"
2222
depends on OF && (ARCH_BCM2835 || ARCH_BRCMSTB || COMPILE_TEST)
2323
select PINMUX
2424
select PINCONF

drivers/pinctrl/bcm/pinctrl-bcm2835.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/irqdesc.h>
2121
#include <linux/init.h>
2222
#include <linux/interrupt.h>
23+
#include <linux/module.h>
2324
#include <linux/of_address.h>
2425
#include <linux/of.h>
2526
#include <linux/of_irq.h>
@@ -1332,4 +1333,10 @@ static struct platform_driver bcm2835_pinctrl_driver = {
13321333
.suppress_bind_attrs = true,
13331334
},
13341335
};
1335-
builtin_platform_driver(bcm2835_pinctrl_driver);
1336+
module_platform_driver(bcm2835_pinctrl_driver);
1337+
1338+
MODULE_AUTHOR("Chris Boot");
1339+
MODULE_AUTHOR("Simon Arlott");
1340+
MODULE_AUTHOR("Stephen Warren");
1341+
MODULE_DESCRIPTION("Broadcom BCM2835/2711 pinctrl and GPIO driver");
1342+
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)