1 From a7357be131e30fd1fb987b2cb343bc81db487f96 Mon Sep 17 00:00:00 2001
2 From: Andy Gross <agross@codeaurora.org>
3 Date: Thu, 12 Jun 2014 14:34:11 -0500
4 Subject: [PATCH 134/182] spi: qup: Fix order of spi_register_master
6 This patch moves the devm_spi_register_master below the initialization of the
7 runtime_pm. If done in the wrong order, the spi_register_master fails if any
8 probed slave devices issue SPI transactions.
10 Signed-off-by: Andy Gross <agross@codeaurora.org>
11 Acked-by: Ivan T. Ivanov <iivanov@mm-sol.com>
13 drivers/spi/spi-qup.c | 11 +++++++----
14 1 file changed, 7 insertions(+), 4 deletions(-)
16 --- a/drivers/spi/spi-qup.c
17 +++ b/drivers/spi/spi-qup.c
18 @@ -619,16 +619,19 @@ static int spi_qup_probe(struct platform
22 - ret = devm_spi_register_master(dev, master);
26 pm_runtime_set_autosuspend_delay(dev, MSEC_PER_SEC);
27 pm_runtime_use_autosuspend(dev);
28 pm_runtime_set_active(dev);
29 pm_runtime_enable(dev);
31 + ret = devm_spi_register_master(dev, master);
38 + pm_runtime_disable(&pdev->dev);
40 clk_disable_unprepare(cclk);
41 clk_disable_unprepare(iclk);