summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sh-msiof.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-12-24 12:57:54 +0000
committerMark Brown <broonie@kernel.org>2014-12-24 12:57:54 +0000
commitee4629f5b2f3dda7c83fa816068a67073abb55d9 (patch)
tree341e0c232286acc9d10743bb3ee5da32ef3d6e59 /drivers/spi/spi-sh-msiof.c
parent76fe5e95fac3c93bdff9102480e5ba823ba656c3 (diff)
parent015760563ec77bf17cec712fa94afdf53b285287 (diff)
downloadlinux-stable-ee4629f5b2f3dda7c83fa816068a67073abb55d9.tar.gz
linux-stable-ee4629f5b2f3dda7c83fa816068a67073abb55d9.tar.bz2
linux-stable-ee4629f5b2f3dda7c83fa816068a67073abb55d9.zip
Merge remote-tracking branches 'spi/fix/img-spfi' and 'spi/fix/msiof' into spi-linus
Diffstat (limited to 'drivers/spi/spi-sh-msiof.c')
-rw-r--r--drivers/spi/spi-sh-msiof.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
index 239be7cbe5a8..96a5fc0878d8 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;
}