summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-pic32.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:35:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-18 17:39:31 +0000
commit85c675d0d09a45a135bddd15d7b385f8758c32fb (patch)
tree76267dbc9b9a130337be3640948fe397b04ac629 /drivers/spi/spi-pic32.c
parentAdding upstream version 6.6.15. (diff)
downloadlinux-85c675d0d09a45a135bddd15d7b385f8758c32fb.tar.xz
linux-85c675d0d09a45a135bddd15d7b385f8758c32fb.zip
Adding upstream version 6.7.7.upstream/6.7.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/spi/spi-pic32.c')
-rw-r--r--drivers/spi/spi-pic32.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/spi/spi-pic32.c b/drivers/spi/spi-pic32.c
index 52b788dac1..f55b38c577 100644
--- a/drivers/spi/spi-pic32.c
+++ b/drivers/spi/spi-pic32.c
@@ -730,17 +730,13 @@ static int pic32_spi_hw_probe(struct platform_device *pdev,
return pic32s->tx_irq;
/* get clock */
- pic32s->clk = devm_clk_get(&pdev->dev, "mck0");
+ pic32s->clk = devm_clk_get_enabled(&pdev->dev, "mck0");
if (IS_ERR(pic32s->clk)) {
dev_err(&pdev->dev, "clk not found\n");
ret = PTR_ERR(pic32s->clk);
goto err_unmap_mem;
}
- ret = clk_prepare_enable(pic32s->clk);
- if (ret)
- goto err_unmap_mem;
-
pic32_spi_hw_init(pic32s);
return 0;
@@ -837,7 +833,6 @@ static int pic32_spi_probe(struct platform_device *pdev)
err_bailout:
pic32_spi_dma_unprep(pic32s);
- clk_disable_unprepare(pic32s->clk);
err_host:
spi_controller_put(host);
return ret;
@@ -849,7 +844,6 @@ static void pic32_spi_remove(struct platform_device *pdev)
pic32s = platform_get_drvdata(pdev);
pic32_spi_disable(pic32s);
- clk_disable_unprepare(pic32s->clk);
pic32_spi_dma_unprep(pic32s);
}