Skip to content

Commit f78c55e

Browse files
baolin-wangsre
authored andcommitted
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 <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 274afbc commit f78c55e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

drivers/power/reset/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ config SYSCON_REBOOT_MODE
248248
action according to the mode.
249249

250250
config POWER_RESET_SC27XX
251-
bool "Spreadtrum SC27xx PMIC power-off driver"
251+
tristate "Spreadtrum SC27xx PMIC power-off driver"
252252
depends on MFD_SC27XX_PMIC || COMPILE_TEST
253253
help
254254
This driver supports powering off a system through

drivers/power/reset/sc27xx-poweroff.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include <linux/cpu.h>
88
#include <linux/kernel.h>
9+
#include <linux/module.h>
910
#include <linux/platform_device.h>
1011
#include <linux/pm.h>
1112
#include <linux/regmap.h>
@@ -71,4 +72,8 @@ static struct platform_driver sc27xx_poweroff_driver = {
7172
.name = "sc27xx-poweroff",
7273
},
7374
};
74-
builtin_platform_driver(sc27xx_poweroff_driver);
75+
module_platform_driver(sc27xx_poweroff_driver);
76+
77+
MODULE_DESCRIPTION("Power off driver for SC27XX PMIC Device");
78+
MODULE_AUTHOR("Baolin Wang <[email protected]>");
79+
MODULE_LICENSE("GPL v2");

0 commit comments

Comments
 (0)