summaryrefslogtreecommitdiffstats
path: root/drivers/net/can/spi
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-08-26 19:26:23 +0200
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-09-03 10:23:57 +0200
commit761a61591705bffb46641dfe4df4c8bb5d011ef6 (patch)
tree02b3ec268486c85b057cdfb0a426d38a51a31f8b /drivers/net/can/spi
parentcan: mcp251x: Make use of device property API (diff)
downloadlinux-761a61591705bffb46641dfe4df4c8bb5d011ef6.tar.xz
linux-761a61591705bffb46641dfe4df4c8bb5d011ef6.zip
can: mcp251x: Call wrapper instead of regulator_disable()
There is no need to check for regulator presence in the ->suspend() since a wrapper does it for us. Due to this we may unconditionally set AFTER_SUSPEND_POWER flag. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/spi')
-rw-r--r--drivers/net/can/spi/mcp251x.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c
index e0885499f604..bee9f7b8dad6 100644
--- a/drivers/net/can/spi/mcp251x.c
+++ b/drivers/net/can/spi/mcp251x.c
@@ -1142,10 +1142,8 @@ static int __maybe_unused mcp251x_can_suspend(struct device *dev)
priv->after_suspend = AFTER_SUSPEND_DOWN;
}
- if (!IS_ERR_OR_NULL(priv->power)) {
- regulator_disable(priv->power);
- priv->after_suspend |= AFTER_SUSPEND_POWER;
- }
+ mcp251x_power_enable(priv->power, 0);
+ priv->after_suspend |= AFTER_SUSPEND_POWER;
return 0;
}