summaryrefslogtreecommitdiffstats
path: root/drivers/extcon
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2020-08-17 09:00:07 +0200
committerChanwoo Choi <cw00.choi@samsung.com>2020-09-24 19:20:48 +0900
commit35f1f8f2a3fa0aa41bbb017d2e36248e6878ab68 (patch)
tree1484f6d5fc269823d515ffc03df97b3886a37de2 /drivers/extcon
parentb8787ff8a4f4bc9255ce041f7b735d3d2b97b857 (diff)
downloadlinux-35f1f8f2a3fa0aa41bbb017d2e36248e6878ab68.tar.bz2
extcon: ptn5150: Convert to module_i2c_driver
Use module_i2c_driver() to simplify driver init boilerplate. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Reviewed-by: Vijai Kumar K <vijaikumar.kanagarajan@gmail.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon')
-rw-r--r--drivers/extcon/extcon-ptn5150.c7
1 files changed, 1 insertions, 6 deletions
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 <vijaikumar.kanagarajan@gmail.com>");