mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
Revert "i2c: tegra: Fix suspending in active runtime PM state"
This reverts commit9f42de8d4e
. It's not safe to use pm_runtime_force_{suspend,resume}(), especially during the noirq phase of suspend. See also the guidance provided in commit1e2ef05bb8
("PM: Limit race conditions between runtime PM and system sleep (v2)"). Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
0e698dfa28
commit
78ad734218
@ -1769,14 +1769,9 @@ static int tegra_i2c_remove(struct platform_device *pdev)
|
||||
static int __maybe_unused tegra_i2c_suspend(struct device *dev)
|
||||
{
|
||||
struct tegra_i2c_dev *i2c_dev = dev_get_drvdata(dev);
|
||||
int err;
|
||||
|
||||
i2c_mark_adapter_suspended(&i2c_dev->adapter);
|
||||
|
||||
err = pm_runtime_force_suspend(dev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1797,10 +1792,6 @@ static int __maybe_unused tegra_i2c_resume(struct device *dev)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = pm_runtime_force_resume(dev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
i2c_mark_adapter_resumed(&i2c_dev->adapter);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user