summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-sh-msiof.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-01-07 18:30:17 +0100
committerMark Brown <broonie@kernel.org>2015-01-07 18:30:17 +0100
commit1285c3fefaddedf5358f52cfde3c2b64d8086a04 (patch)
tree361f556d6b400e8cb6d16738142db2f69f63ef2f /drivers/spi/spi-sh-msiof.c
parentMerge remote-tracking branch 'spi/fix/msiof' into spi-sh-msiof (diff)
parentLinux 3.19-rc3 (diff)
downloadlinux-1285c3fefaddedf5358f52cfde3c2b64d8086a04.tar.xz
linux-1285c3fefaddedf5358f52cfde3c2b64d8086a04.zip
Merge tag 'v3.19-rc3' into spi-sh-msiof
Linux 3.19-rc3
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 6b13836de307..c58c2494a297 100644
--- a/drivers/spi/spi-sh-msiof.c
+++ b/drivers/spi/spi-sh-msiof.c
@@ -525,6 +525,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),
@@ -543,6 +545,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;
}