Browse Source

Merge remote-tracking branches 'spi/fix/img-spfi' and 'spi/fix/msiof' into spi-linus

Mark Brown 11 years ago
parent
commit
ee4629f5b2
1 changed files with 5 additions and 0 deletions
  1. 5 0
      drivers/spi/spi-sh-msiof.c

+ 5 - 0
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;
 }