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

This commit is contained in:
qctecmdr 2023-11-09 02:43:02 -08:00 committed by Gerrit - the friendly Code Review server
commit e602774fc1

View File

@ -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