Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e602774f authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mtd: msm_qpic_nand: Add mutex lock in system suspend/resume functions"

parents 63ba6ae8 6c27e9b7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -231,20 +231,27 @@ static void msm_nand_print_rpm_info(struct device *dev)
static int msm_nand_suspend(struct device *dev)
{
	int ret = 0;
	struct msm_nand_info *info = dev_get_drvdata(dev);

	mutex_lock(&info->lock);

	if (!pm_runtime_suspended(dev))
		ret = msm_nand_runtime_suspend(dev);

	mutex_unlock(&info->lock);
	return ret;
}

static int msm_nand_resume(struct device *dev)
{
	int ret = 0;
	struct msm_nand_info *info = dev_get_drvdata(dev);

	mutex_lock(&info->lock);
	if (!pm_runtime_suspended(dev))
		ret = msm_nand_runtime_resume(dev);

	mutex_unlock(&info->lock);
	return ret;
}
#else