dmaengine: lgm: Use builtin_platform_driver macro to simplify the code
authorLi Zetao <lizetao1@huawei.com>
Tue, 15 Aug 2023 08:02:50 +0000 (16:02 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 21 Aug 2023 05:43:09 +0000 (11:13 +0530)
Use the builtin_platform_driver macro to simplify the code, which is the
same as declaring with device_initcall().

Signed-off-by: Li Zetao <lizetao1@huawei.com>
Acked-by: Peter Harliman Liem <pliem@maxlinear.com>
Link: https://lore.kernel.org/r/20230815080250.1089589-1-lizetao1@huawei.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/lgm/lgm-dma.c

index 1709d15..4117c7b 100644 (file)
@@ -1732,9 +1732,4 @@ static struct platform_driver intel_ldma_driver = {
  * registered DMA channels and DMA capabilities to clients before their
  * initialization.
  */
-static int __init intel_ldma_init(void)
-{
-       return platform_driver_register(&intel_ldma_driver);
-}
-
-device_initcall(intel_ldma_init);
+builtin_platform_driver(intel_ldma_driver);