gpio: sifive: Allow building the driver as a module
authorSamuel Holland <samuel.holland@sifive.com>
Tue, 25 Jul 2023 00:40:42 +0000 (17:40 -0700)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 25 Jul 2023 10:00:42 +0000 (12:00 +0200)
This can reduce the kernel image size in multiplatform configurations.

Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/Kconfig
drivers/gpio/gpio-sifive.c

index 1cf267a..398d9ef 100644 (file)
@@ -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
index 8033bb8..8decd9b 100644 (file)
@@ -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 <yash.shah@sifive.com>");
+MODULE_DESCRIPTION("SiFive GPIO driver");
+MODULE_LICENSE("GPL");