diff options
author | Harshal Chaudhari <harshalchau04@gmail.com> | 2020-05-10 19:43:08 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-05-15 17:20:01 +0300 |
commit | 286adb4cce00d2ed37eb20a19ce366d1d58adf42 (patch) | |
tree | 7f43cc2234ccf701ae563a0edcf739387a69781a /drivers/misc/xilinx_sdfec.c | |
parent | 7066c2f61ce49b131026fec68ed1c9b0d0d9a05a (diff) | |
download | linux-286adb4cce00d2ed37eb20a19ce366d1d58adf42.tar.xz |
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: Harshal Chaudhari <harshalchau04@gmail.com>
Acked-by: Dragan Cvetic <dragan.cvetic@xilinx.com>
Link: https://lore.kernel.org/r/20200510164308.31358-1-harshalchau04@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/xilinx_sdfec.c')
-rw-r--r-- | drivers/misc/xilinx_sdfec.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/misc/xilinx_sdfec.c b/drivers/misc/xilinx_sdfec.c index 7a7589417e87..4200978e607e 100644 --- a/drivers/misc/xilinx_sdfec.c +++ b/drivers/misc/xilinx_sdfec.c @@ -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"); |