spi: omap2-mcspi: Remove unnecessary pm_runtime_force_suspend()
Commit5a686b2c9e
("spi: omap2-mcspi: Idle hardware during suspend and resume") added calls for pm_runtime_force_suspend() and pm_runtime_force_resume() to make sure spi is idled between device_prepare() and device_complete(). But testing Linux next, I now noticed that we will get the following: spi_master spi0: Failed to power device: -13 Looking at things more turns out we can just remove this non-standard code. I was probably testing with some extra experimental patches earlier when I thought we need pm_runtime_force_suspend() and pm_runtime_force_resume(). Fixes:5a686b2c9e
("spi: omap2-mcspi: Idle hardware during suspend and resume") Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7e48e23a1f
commit
d073bfa56b
|
@ -1467,20 +1467,6 @@ MODULE_ALIAS("platform:omap2_mcspi");
|
||||||
#ifdef CONFIG_SUSPEND
|
#ifdef CONFIG_SUSPEND
|
||||||
static int omap2_mcspi_suspend_noirq(struct device *dev)
|
static int omap2_mcspi_suspend_noirq(struct device *dev)
|
||||||
{
|
{
|
||||||
int error;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Make sure device gets idled if other drivers call SPI
|
|
||||||
* functions between device_prepare() and device_complete()
|
|
||||||
*/
|
|
||||||
error = pm_runtime_force_suspend(dev);
|
|
||||||
if (error < 0) {
|
|
||||||
dev_err(dev, "%s: force suspend failed: %i\n",
|
|
||||||
__func__, error);
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
return pinctrl_pm_select_sleep_state(dev);
|
return pinctrl_pm_select_sleep_state(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1495,14 +1481,6 @@ static int omap2_mcspi_resume_noirq(struct device *dev)
|
||||||
dev_warn(mcspi->dev, "%s: failed to set pins: %i\n",
|
dev_warn(mcspi->dev, "%s: failed to set pins: %i\n",
|
||||||
__func__, error);
|
__func__, error);
|
||||||
|
|
||||||
error = pm_runtime_force_resume(mcspi->dev);
|
|
||||||
if (error < 0) {
|
|
||||||
dev_warn(mcspi->dev, "%s: force resume failed: %i\n",
|
|
||||||
__func__, error);
|
|
||||||
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user