Skip to content

Commit dbc8880

Browse files
Liu Shixinchanwoochoi
authored andcommitted
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>
1 parent 6be65ed commit dbc8880

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎drivers/extcon/extcon-axp288.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -491,18 +491,7 @@ static struct platform_driver axp288_extcon_driver = {
491491
.pm = &axp288_extcon_pm_ops,
492492
},
493493
};
494-
495-
static int __init axp288_extcon_init(void)
496-
{
497-
return platform_driver_register(&axp288_extcon_driver);
498-
}
499-
module_init(axp288_extcon_init);
500-
501-
static void __exit axp288_extcon_exit(void)
502-
{
503-
platform_driver_unregister(&axp288_extcon_driver);
504-
}
505-
module_exit(axp288_extcon_exit);
494+
module_platform_driver(axp288_extcon_driver);
506495

507496
MODULE_AUTHOR("Ramakrishna Pallala <ramakrishna.pallala@intel.com>");
508497
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");

0 commit comments

Comments
 (0)