mirror of https://gitee.com/openkylin/linux.git
linux-can-fixes-for-4.2-20150716
-----BEGIN PGP SIGNATURE----- iQEcBAABCgAGBQJVp19MAAoJEP5prqPJtc/HsA8IAIqYKwJtXHItVoG6GBxLo/iJ G6OhCxSgDPUdytdyvWRmYL+2g6q9+BefnApwGroM0wowytHx4I6kF2O4LKEvthnD TzDV6uY0n1CR8FzCdfQdTFedAfxIx7DLCqY/iC+JRFTh6Vhvj46WtHickthu4Se+ ygTWg5f5Da086JTUtwbb75TCHJv8xxtN57t6yZTtDoyaftqWd1Dzrmi8dBwHRWBA 6X/rE4VekFwFCbqOlv5ghm86lD77sMTEaU0xkm9FeZmO/CnUD3JASwi844RtCqXR wj3OJ89qH14YmpJwjpakIwHfTyyPJurzPpPkCTZ6awmdNhCvp+h3nbfjKRqs0WU= =pQGs -----END PGP SIGNATURE----- Merge tag 'linux-can-fixes-for-4.2-20150716' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2015-07-16 this is a pull request of 2 patches by Stefan Agner. He fixes the resume operation in the mcp251x driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
686c953ea9
|
@ -1086,8 +1086,8 @@ static int mcp251x_can_probe(struct spi_device *spi)
|
|||
if (ret)
|
||||
goto out_clk;
|
||||
|
||||
priv->power = devm_regulator_get(&spi->dev, "vdd");
|
||||
priv->transceiver = devm_regulator_get(&spi->dev, "xceiver");
|
||||
priv->power = devm_regulator_get_optional(&spi->dev, "vdd");
|
||||
priv->transceiver = devm_regulator_get_optional(&spi->dev, "xceiver");
|
||||
if ((PTR_ERR(priv->power) == -EPROBE_DEFER) ||
|
||||
(PTR_ERR(priv->transceiver) == -EPROBE_DEFER)) {
|
||||
ret = -EPROBE_DEFER;
|
||||
|
@ -1222,17 +1222,16 @@ static int __maybe_unused mcp251x_can_resume(struct device *dev)
|
|||
struct spi_device *spi = to_spi_device(dev);
|
||||
struct mcp251x_priv *priv = spi_get_drvdata(spi);
|
||||
|
||||
if (priv->after_suspend & AFTER_SUSPEND_POWER) {
|
||||
if (priv->after_suspend & AFTER_SUSPEND_POWER)
|
||||
mcp251x_power_enable(priv->power, 1);
|
||||
|
||||
if (priv->after_suspend & AFTER_SUSPEND_UP) {
|
||||
mcp251x_power_enable(priv->transceiver, 1);
|
||||
queue_work(priv->wq, &priv->restart_work);
|
||||
} else {
|
||||
if (priv->after_suspend & AFTER_SUSPEND_UP) {
|
||||
mcp251x_power_enable(priv->transceiver, 1);
|
||||
queue_work(priv->wq, &priv->restart_work);
|
||||
} else {
|
||||
priv->after_suspend = 0;
|
||||
}
|
||||
priv->after_suspend = 0;
|
||||
}
|
||||
|
||||
priv->force_quit = 0;
|
||||
enable_irq(spi->irq);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue