From: Baolin Wang Date: Mon, 9 Mar 2020 08:18:46 +0000 (+0800) Subject: power: reset: sc27xx: Allow the SC27XX poweroff driver building into a module X-Git-Tag: v5.10.7~2876^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f78c55e3b4806974f7d590b2aab8683232b7bd25;p=platform%2Fkernel%2Flinux-rpi.git power: reset: sc27xx: Allow the SC27XX poweroff driver building into a module Change the config to 'tristate' and use module_platform_driver() to allow the SC27XX poweroff driver building into a module, as well as adding some mudule information. Signed-off-by: Baolin Wang Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig index 513efe8..8903803 100644 --- a/drivers/power/reset/Kconfig +++ b/drivers/power/reset/Kconfig @@ -248,7 +248,7 @@ config SYSCON_REBOOT_MODE action according to the mode. config POWER_RESET_SC27XX - bool "Spreadtrum SC27xx PMIC power-off driver" + tristate "Spreadtrum SC27xx PMIC power-off driver" depends on MFD_SC27XX_PMIC || COMPILE_TEST help This driver supports powering off a system through diff --git a/drivers/power/reset/sc27xx-poweroff.c b/drivers/power/reset/sc27xx-poweroff.c index 91b5ece..6986307 100644 --- a/drivers/power/reset/sc27xx-poweroff.c +++ b/drivers/power/reset/sc27xx-poweroff.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include @@ -71,4 +72,8 @@ static struct platform_driver sc27xx_poweroff_driver = { .name = "sc27xx-poweroff", }, }; -builtin_platform_driver(sc27xx_poweroff_driver); +module_platform_driver(sc27xx_poweroff_driver); + +MODULE_DESCRIPTION("Power off driver for SC27XX PMIC Device"); +MODULE_AUTHOR("Baolin Wang "); +MODULE_LICENSE("GPL v2");