Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: dw-mmio: prepare the clock before enabling

This is required for common clock support.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Mark Brown <broonie@linaro.org>

authored by

Baruch Siach and committed by
Mark Brown
020fe3fe 04f421e7

+3 -3
+3 -3
drivers/spi/spi-dw-mmio.c
··· 62 62 dwsmmio->clk = devm_clk_get(&pdev->dev, NULL); 63 63 if (IS_ERR(dwsmmio->clk)) 64 64 return PTR_ERR(dwsmmio->clk); 65 - ret = clk_enable(dwsmmio->clk); 65 + ret = clk_prepare_enable(dwsmmio->clk); 66 66 if (ret) 67 67 return ret; 68 68 ··· 78 78 return 0; 79 79 80 80 out: 81 - clk_disable(dwsmmio->clk); 81 + clk_disable_unprepare(dwsmmio->clk); 82 82 return ret; 83 83 } 84 84 ··· 86 86 { 87 87 struct dw_spi_mmio *dwsmmio = platform_get_drvdata(pdev); 88 88 89 - clk_disable(dwsmmio->clk); 89 + clk_disable_unprepare(dwsmmio->clk); 90 90 dw_spi_remove_host(&dwsmmio->dws); 91 91 92 92 return 0;