summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@freemail.hu>2017-12-19 08:24:38 +0100
committerJohn Crispin <john@phrozen.org>2017-12-24 09:03:01 +0100
commit6456999731fa8d22419ffeef9c1710e484620c80 (patch)
treee5a624872700ab70897e41d9f73060fefac18e83 /target
parentdf68e63a4f297c85c240f670fded55d3d3387dc4 (diff)
downloadmtk-20170518-6456999731fa8d22419ffeef9c1710e484620c80.zip
mtk-20170518-6456999731fa8d22419ffeef9c1710e484620c80.tar.gz
mtk-20170518-6456999731fa8d22419ffeef9c1710e484620c80.tar.bz2
ar71xx: spi-rb4xx: balance clk_prepare_enable() call
Commit c312cef223dd ("ar71xx: spi-rb4xx fix.") replaced the clk_enable() call with clk_prepare_enable() to meet the common clock framework requirements. However it did not change the clk_disable() call in the error patch which thus leads to imbalance. Fix the code by using the correct counterpart of clk_prepare_enable() in both places. Fixes: c312cef223dd ("ar71xx: spi-rb4xx fix.") Signed-off-by: Gabor Juhos <juhosg@freemail.hu>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c b/target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c
index 9175fc7..2d95e80 100644
--- a/target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c
+++ b/target/linux/ar71xx/files/drivers/spi/spi-rb4xx.c
@@ -379,7 +379,7 @@ static int rb4xx_spi_probe(struct platform_device *pdev)
err_iounmap:
iounmap(rbspi->base);
err_clk_disable:
- clk_disable(rbspi->ahb_clk);
+ clk_disable_unprepare(rbspi->ahb_clk);
err_clk_put:
clk_put(rbspi->ahb_clk);
err_put_master:
@@ -394,7 +394,7 @@ static int rb4xx_spi_remove(struct platform_device *pdev)
struct rb4xx_spi *rbspi = platform_get_drvdata(pdev);
iounmap(rbspi->base);
- clk_disable(rbspi->ahb_clk);
+ clk_disable_unprepare(rbspi->ahb_clk);
clk_put(rbspi->ahb_clk);
platform_set_drvdata(pdev, NULL);
spi_master_put(rbspi->master);