From: Li Zetao Date: Tue, 15 Aug 2023 08:02:50 +0000 (+0800) Subject: dmaengine: lgm: Use builtin_platform_driver macro to simplify the code X-Git-Tag: v6.6-rc1~72^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8674ca395003272d8215e949838ef3b27d67afde;p=thirdparty%2Fkernel%2Fstable.git dmaengine: lgm: Use builtin_platform_driver macro to simplify the code Use the builtin_platform_driver macro to simplify the code, which is the same as declaring with device_initcall(). Signed-off-by: Li Zetao Acked-by: Peter Harliman Liem Link: https://lore.kernel.org/r/20230815080250.1089589-1-lizetao1@huawei.com Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/lgm/lgm-dma.c b/drivers/dma/lgm/lgm-dma.c index 1709d159af7e0..4117c7b67e9c2 100644 --- a/drivers/dma/lgm/lgm-dma.c +++ b/drivers/dma/lgm/lgm-dma.c @@ -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);