Skip to content

Commit

Permalink
mfd: sec: Initialize driver via module_platform_driver()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Marek Szyprowski <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
krzk authored and Lee Jones committed Apr 14, 2021
1 parent 2111989 commit 0c8f2d1
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions drivers/mfd/sec-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,19 +549,7 @@ static struct i2c_driver sec_pmic_driver = {
.shutdown = sec_pmic_shutdown,
.id_table = sec_pmic_id,
};

static int __init sec_pmic_init(void)
{
return i2c_add_driver(&sec_pmic_driver);
}

subsys_initcall(sec_pmic_init);

static void __exit sec_pmic_exit(void)
{
i2c_del_driver(&sec_pmic_driver);
}
module_exit(sec_pmic_exit);
module_i2c_driver(sec_pmic_driver);

MODULE_AUTHOR("Sangbeom Kim <[email protected]>");
MODULE_DESCRIPTION("Core support for the S5M MFD");
Expand Down

0 comments on commit 0c8f2d1

Please sign in to comment.