Commit 761a6159 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Marc Kleine-Budde

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 8de29a5c
......@@ -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);
mcp251x_power_enable(priv->power, 0);
priv->after_suspend |= AFTER_SUSPEND_POWER;
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment