summaryrefslogtreecommitdiff
path: root/drivers/extcon/extcon-axp288.c
diff options
context:
space:
mode:
authorLiu Shixin <liushixin2@huawei.com>2020-09-14 09:54:00 +0300
committerChanwoo Choi <cw00.choi@samsung.com>2020-09-29 18:40:06 +0300
commitdbc888072a976c2a7f74ad2df1ca3e6894f96002 (patch)
tree65f73b1338df4f014a11edb1adeb9b19b1f842c4 /drivers/extcon/extcon-axp288.c
parent6be65ed4f86aa7c4ba5c0193202d563f098e783f (diff)
downloadlinux-dbc888072a976c2a7f74ad2df1ca3e6894f96002.tar.xz
extcon: axp288: Use module_platform_driver to simplify the code
module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Diffstat (limited to 'drivers/extcon/extcon-axp288.c')
-rw-r--r--drivers/extcon/extcon-axp288.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c
index 525345367260..fdb31954cf2b 100644
--- a/drivers/extcon/extcon-axp288.c
+++ b/drivers/extcon/extcon-axp288.c
@@ -491,18 +491,7 @@ static struct platform_driver axp288_extcon_driver = {
.pm = &axp288_extcon_pm_ops,
},
};
-
-static int __init axp288_extcon_init(void)
-{
- return platform_driver_register(&axp288_extcon_driver);
-}
-module_init(axp288_extcon_init);
-
-static void __exit axp288_extcon_exit(void)
-{
- platform_driver_unregister(&axp288_extcon_driver);
-}
-module_exit(axp288_extcon_exit);
+module_platform_driver(axp288_extcon_driver);
MODULE_AUTHOR("Ramakrishna Pallala <ramakrishna.pallala@intel.com>");
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");