diff options
author | Hisashi Nakamura <hisashi.nakamura.ak@renesas.com> | 2014-12-15 15:01:11 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-12-15 18:36:45 +0100 |
commit | 015760563ec77bf17cec712fa94afdf53b285287 (patch) | |
tree | f082394ff0b440e2b73f1b59fc179e31d26c60ae /drivers/spi | |
parent | Merge remote-tracking branches 'spi/topic/spidev' and 'spi/topic/txx9' into s... (diff) | |
download | linux-015760563ec77bf17cec712fa94afdf53b285287.tar.xz linux-015760563ec77bf17cec712fa94afdf53b285287.zip |
spi: sh-msiof: Add runtime PM lock in initializing
SH-MSIOF driver is enabled autosuspend API of spi framework.
But autosuspend framework doesn't work during initializing.
So runtime PM lock is added in SH-MSIOF driver initializing.
Fixes: e2a0ba547ba31c (spi: sh-msiof: Convert to spi core auto_runtime_pm framework)
Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-sh-msiof.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 3f365402fcc0..14052936b1c5 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c @@ -480,6 +480,8 @@ static int sh_msiof_spi_setup(struct spi_device *spi) struct device_node *np = spi->master->dev.of_node; struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master); + pm_runtime_get_sync(&p->pdev->dev); + if (!np) { /* * Use spi->controller_data for CS (same strategy as spi_gpio), @@ -498,6 +500,9 @@ static int sh_msiof_spi_setup(struct spi_device *spi) if (spi->cs_gpio >= 0) gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH)); + + pm_runtime_put_sync(&p->pdev->dev); + return 0; } |