mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
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>
This commit is contained in:
@@ -491,18 +491,7 @@ static struct platform_driver axp288_extcon_driver = {
|
|||||||
.pm = &axp288_extcon_pm_ops,
|
.pm = &axp288_extcon_pm_ops,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
module_platform_driver(axp288_extcon_driver);
|
||||||
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_AUTHOR("Ramakrishna Pallala <ramakrishna.pallala@intel.com>");
|
MODULE_AUTHOR("Ramakrishna Pallala <ramakrishna.pallala@intel.com>");
|
||||||
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
|
MODULE_AUTHOR("Hans de Goede <hdegoede@redhat.com>");
|
||||||
|
Reference in New Issue
Block a user