Commit 286adb4c authored by Harshal Chaudhari's avatar Harshal Chaudhari Committed by Greg Kroah-Hartman

misc: xilinx-sdfec: convert to module_platform_driver()

The driver init and exit function don't do anything besides registering
and unregistering the platform driver, so the module_platform_driver()
macro could just be used instead of having separate functions.
Signed-off-by: default avatarHarshal Chaudhari <harshalchau04@gmail.com>
Acked-by: default avatarDragan Cvetic <dragan.cvetic@xilinx.com>
Link: https://lore.kernel.org/r/20200510164308.31358-1-harshalchau04@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7066c2f6
......@@ -1479,25 +1479,7 @@ static struct platform_driver xsdfec_driver = {
.remove = xsdfec_remove,
};
static int __init xsdfec_init(void)
{
int err;
err = platform_driver_register(&xsdfec_driver);
if (err < 0) {
pr_err("%s Unabled to register SDFEC driver", __func__);
return err;
}
return 0;
}
static void __exit xsdfec_exit(void)
{
platform_driver_unregister(&xsdfec_driver);
}
module_init(xsdfec_init);
module_exit(xsdfec_exit);
module_platform_driver(xsdfec_driver);
MODULE_AUTHOR("Xilinx, Inc");
MODULE_DESCRIPTION("Xilinx SD-FEC16 Driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment