summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-fsl-dspi.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:57 +0000
commitdc50eab76b709d68175a358d6e23a5a3890764d3 (patch)
treec754d0390db060af0213ff994f0ac310e4cfd6e9 /drivers/spi/spi-fsl-dspi.c
parentAdding debian version 6.6.15-2. (diff)
downloadlinux-dc50eab76b709d68175a358d6e23a5a3890764d3.tar.xz
linux-dc50eab76b709d68175a358d6e23a5a3890764d3.zip
Merging upstream version 6.7.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/spi/spi-fsl-dspi.c')
-rw-r--r--drivers/spi/spi-fsl-dspi.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 8318249f8a..c9eae046f6 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1372,19 +1372,16 @@ static int dspi_probe(struct platform_device *pdev)
}
}
- dspi->clk = devm_clk_get(&pdev->dev, "dspi");
+ dspi->clk = devm_clk_get_enabled(&pdev->dev, "dspi");
if (IS_ERR(dspi->clk)) {
ret = PTR_ERR(dspi->clk);
dev_err(&pdev->dev, "unable to get clock\n");
goto out_ctlr_put;
}
- ret = clk_prepare_enable(dspi->clk);
- if (ret)
- goto out_ctlr_put;
ret = dspi_init(dspi);
if (ret)
- goto out_clk_put;
+ goto out_ctlr_put;
dspi->irq = platform_get_irq(pdev, 0);
if (dspi->irq <= 0) {
@@ -1400,7 +1397,7 @@ static int dspi_probe(struct platform_device *pdev)
IRQF_SHARED, pdev->name, dspi);
if (ret < 0) {
dev_err(&pdev->dev, "Unable to attach DSPI interrupt\n");
- goto out_clk_put;
+ goto out_ctlr_put;
}
poll_mode:
@@ -1432,8 +1429,6 @@ out_release_dma:
out_free_irq:
if (dspi->irq)
free_irq(dspi->irq, dspi);
-out_clk_put:
- clk_disable_unprepare(dspi->clk);
out_ctlr_put:
spi_controller_put(ctlr);
@@ -1458,7 +1453,6 @@ static void dspi_remove(struct platform_device *pdev)
dspi_release_dma(dspi);
if (dspi->irq)
free_irq(dspi->irq, dspi);
- clk_disable_unprepare(dspi->clk);
}
static void dspi_shutdown(struct platform_device *pdev)