Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Krzysztof Kozlowski and committed by
Lee Jones
0c8f2d10 21119896

+1 -13
+1 -13
drivers/mfd/sec-core.c
··· 549 549 .shutdown = sec_pmic_shutdown, 550 550 .id_table = sec_pmic_id, 551 551 }; 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); 565 553 566 554 MODULE_AUTHOR("Sangbeom Kim <sbkim73@samsung.com>"); 567 555 MODULE_DESCRIPTION("Core support for the S5M MFD");