From: Liu Shixin Date: Mon, 14 Sep 2020 06:54:00 +0000 (+0800) Subject: extcon: axp288: Use module_platform_driver to simplify the code X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=dbc888072a976c2a7f74ad2df1ca3e6894f96002;p=linux.git 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 Reviewed-by: Hans de Goede Signed-off-by: Chanwoo Choi --- diff --git a/drivers/extcon/extcon-axp288.c b/drivers/extcon/extcon-axp288.c index 525345367260a..fdb31954cf2b6 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 "); MODULE_AUTHOR("Hans de Goede ");