From: Samuel Holland Date: Tue, 25 Jul 2023 00:40:42 +0000 (-0700) Subject: gpio: sifive: Allow building the driver as a module X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6b4c76ded3582651afca319f2ca58c22ec908529;p=linux.git gpio: sifive: Allow building the driver as a module This can reduce the kernel image size in multiplatform configurations. Acked-by: Palmer Dabbelt Reviewed-by: Andy Shevchenko Signed-off-by: Samuel Holland Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 1cf267a3ed8b0..398d9ef7e6806 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -564,7 +564,7 @@ config GPIO_SAMA5D2_PIOBU maintain their value during backup/self-refresh. config GPIO_SIFIVE - bool "SiFive GPIO support" + tristate "SiFive GPIO support" depends on OF_GPIO select IRQ_DOMAIN_HIERARCHY select GPIO_GENERIC diff --git a/drivers/gpio/gpio-sifive.c b/drivers/gpio/gpio-sifive.c index 8033bb8246c60..8decd9b5d2298 100644 --- a/drivers/gpio/gpio-sifive.c +++ b/drivers/gpio/gpio-sifive.c @@ -267,4 +267,8 @@ static struct platform_driver sifive_gpio_driver = { .of_match_table = sifive_gpio_match, }, }; -builtin_platform_driver(sifive_gpio_driver) +module_platform_driver(sifive_gpio_driver) + +MODULE_AUTHOR("Yash Shah "); +MODULE_DESCRIPTION("SiFive GPIO driver"); +MODULE_LICENSE("GPL");