From 9f0fc191371843c4fc000a226b0a26b6c059aacd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 19:40:19 +0200 Subject: Merging upstream version 6.7.7. Signed-off-by: Daniel Baumann --- drivers/dma/fsl-edma-main.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) (limited to 'drivers/dma/fsl-edma-main.c') diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c index 30df55da4d..75cae7ccae 100644 --- a/drivers/dma/fsl-edma-main.c +++ b/drivers/dma/fsl-edma-main.c @@ -13,13 +13,11 @@ #include #include #include -#include -#include -#include #include #include #include #include +#include #include "fsl-edma-common.h" @@ -240,10 +238,8 @@ static int fsl_edma3_irq_init(struct platform_device *pdev, struct fsl_edma_engi /* request channel irq */ fsl_chan->txirq = platform_get_irq(pdev, i); - if (fsl_chan->txirq < 0) { - dev_err(&pdev->dev, "Can't get chan %d's irq.\n", i); + if (fsl_chan->txirq < 0) return -EINVAL; - } ret = devm_request_irq(&pdev->dev, fsl_chan->txirq, fsl_edma3_tx_handler, IRQF_SHARED, @@ -425,8 +421,6 @@ static int fsl_edma3_attach_pd(struct platform_device *pdev, struct fsl_edma_eng static int fsl_edma_probe(struct platform_device *pdev) { - const struct of_device_id *of_id = - of_match_device(fsl_edma_dt_ids, &pdev->dev); struct device_node *np = pdev->dev.of_node; struct fsl_edma_engine *fsl_edma; const struct fsl_edma_drvdata *drvdata = NULL; @@ -435,8 +429,7 @@ static int fsl_edma_probe(struct platform_device *pdev) int chans; int ret, i; - if (of_id) - drvdata = of_id->data; + drvdata = device_get_match_data(&pdev->dev); if (!drvdata) { dev_err(&pdev->dev, "unable to find driver data\n"); return -EINVAL; @@ -624,7 +617,7 @@ static int fsl_edma_probe(struct platform_device *pdev) return 0; } -static int fsl_edma_remove(struct platform_device *pdev) +static void fsl_edma_remove(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct fsl_edma_engine *fsl_edma = platform_get_drvdata(pdev); @@ -634,8 +627,6 @@ static int fsl_edma_remove(struct platform_device *pdev) of_dma_controller_free(np); dma_async_device_unregister(&fsl_edma->dma_dev); fsl_disable_clocks(fsl_edma, fsl_edma->drvdata->dmamuxs); - - return 0; } static int fsl_edma_suspend_late(struct device *dev) @@ -704,7 +695,7 @@ static struct platform_driver fsl_edma_driver = { .pm = &fsl_edma_pm_ops, }, .probe = fsl_edma_probe, - .remove = fsl_edma_remove, + .remove_new = fsl_edma_remove, }; static int __init fsl_edma_init(void) -- cgit v1.2.3