Message ID | 20230815080250.1089589-1-lizetao1@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 8674ca395003272d8215e949838ef3b27d67afde |
Headers | show |
Series | [-next] dmaengine: lgm: Use builtin_platform_driver macro to simplify the code | expand |
On 15/8/2023 4:03 pm, Li Zetao wrote: > Use the builtin_platform_driver macro to simplify the code, which is the > same as declaring with device_initcall(). Acked-by: Peter Harliman Liem <pliem@maxlinear.com> > > Signed-off-by: Li Zetao <lizetao1@huawei.com> > --- > drivers/dma/lgm/lgm-dma.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/dma/lgm/lgm-dma.c b/drivers/dma/lgm/lgm-dma.c > index 1709d159af7e..4117c7b67e9c 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); > -- > 2.34.1 > >
On Tue, 15 Aug 2023 16:02:50 +0800, Li Zetao wrote: > Use the builtin_platform_driver macro to simplify the code, which is the > same as declaring with device_initcall(). > > Applied, thanks! [1/1] dmaengine: lgm: Use builtin_platform_driver macro to simplify the code commit: 8674ca395003272d8215e949838ef3b27d67afde Best regards,
diff --git a/drivers/dma/lgm/lgm-dma.c b/drivers/dma/lgm/lgm-dma.c index 1709d159af7e..4117c7b67e9c 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);
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> --- drivers/dma/lgm/lgm-dma.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)