Skip to content

Commit 0c8f2d1

Browse files
krzkLee Jones
authored andcommitted
mfd: sec: Initialize driver via module_platform_driver()
The driver was using subsys_initcall() because in old times deferred probe was not supported everywhere and specific ordering was needed. Since probe deferral works fine and specific ordering is discouraged (hides dependencies between drivers and couples their boot order), the driver can be converted to regular module_platform_driver. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
1 parent 2111989 commit 0c8f2d1

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

‎drivers/mfd/sec-core.c‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -549,19 +549,7 @@ static struct i2c_driver sec_pmic_driver = {
549549
.shutdown = sec_pmic_shutdown,
550550
.id_table = sec_pmic_id,
551551
};
552-
553-
static int __init sec_pmic_init(void)
554-
{
555-
return i2c_add_driver(&sec_pmic_driver);
556-
}
557-
558-
subsys_initcall(sec_pmic_init);
559-
560-
static void __exit sec_pmic_exit(void)
561-
{
562-
i2c_del_driver(&sec_pmic_driver);
563-
}
564-
module_exit(sec_pmic_exit);
552+
module_i2c_driver(sec_pmic_driver);
565553

566554
MODULE_AUTHOR("Sangbeom Kim <sbkim73@samsung.com>");
567555
MODULE_DESCRIPTION("Core support for the S5M MFD");

0 commit comments

Comments
 (0)