From: Krzysztof Kozlowski Date: Mon, 17 Aug 2020 07:00:07 +0000 (+0200) Subject: extcon: ptn5150: Convert to module_i2c_driver X-Git-Tag: v5.15~2672^2~35^2~14 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35f1f8f2a3fa0aa41bbb017d2e36248e6878ab68;p=platform%2Fkernel%2Flinux-starfive.git extcon: ptn5150: Convert to module_i2c_driver Use module_i2c_driver() to simplify driver init boilerplate. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Vijai Kumar K Signed-off-by: Chanwoo Choi --- diff --git a/drivers/extcon/extcon-ptn5150.c b/drivers/extcon/extcon-ptn5150.c index c8611ff90990..690d878c65f1 100644 --- a/drivers/extcon/extcon-ptn5150.c +++ b/drivers/extcon/extcon-ptn5150.c @@ -337,12 +337,7 @@ static struct i2c_driver ptn5150_i2c_driver = { .probe = ptn5150_i2c_probe, .id_table = ptn5150_i2c_id, }; - -static int __init ptn5150_i2c_init(void) -{ - return i2c_add_driver(&ptn5150_i2c_driver); -} -subsys_initcall(ptn5150_i2c_init); +module_i2c_driver(ptn5150_i2c_driver); MODULE_DESCRIPTION("NXP PTN5150 CC logic Extcon driver"); MODULE_AUTHOR("Vijai Kumar K ");