diff options
| author | Krzysztof Kozlowski <[email protected]> | 2025-05-02 06:20:36 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2025-07-01 10:18:07 +0000 |
| commit | a46da20be76cd25c791e22532d34d9313b422cf1 (patch) | |
| tree | 7c28cec03e2a2082a3de649eba694f4ee4b886d8 /drivers/cdx/controller/cdx_controller.c | |
| parent | cdx: controller: Drop useless probe success message (diff) | |
| download | kernel-a46da20be76cd25c791e22532d34d9313b422cf1.tar.gz kernel-a46da20be76cd25c791e22532d34d9313b422cf1.zip | |
cdx: controller: Do not open-code module_platform_driver()
Replace standard platform_driver_register() boilerplate with
module_platform_driver() to make code smaller.
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Acked-by: Nikhil Agarwal <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/cdx/controller/cdx_controller.c')
| -rw-r--r-- | drivers/cdx/controller/cdx_controller.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/cdx/controller/cdx_controller.c b/drivers/cdx/controller/cdx_controller.c index fce90926d337..bfb5ac2d861f 100644 --- a/drivers/cdx/controller/cdx_controller.c +++ b/drivers/cdx/controller/cdx_controller.c @@ -250,24 +250,7 @@ static struct platform_driver cdx_pdriver = { .remove = xlnx_cdx_remove, }; -static int __init cdx_controller_init(void) -{ - int ret; - - ret = platform_driver_register(&cdx_pdriver); - if (ret) - pr_err("platform_driver_register() failed: %d\n", ret); - - return ret; -} - -static void __exit cdx_controller_exit(void) -{ - platform_driver_unregister(&cdx_pdriver); -} - -module_init(cdx_controller_init); -module_exit(cdx_controller_exit); +module_platform_driver(cdx_pdriver); MODULE_AUTHOR("AMD Inc."); MODULE_DESCRIPTION("CDX controller for AMD devices"); |
