mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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 <krzysztof.kozlowski@linaro.org> Acked-by: Nikhil Agarwal <nikhil.agarwal@amd.com> Link: https://lore.kernel.org/r/20250502-cdx-clean-v3-4-6aaa5b369fc5@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
cfe78d4aa9
commit
a46da20be7
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user