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

Commit 57612c99 authored by Bhaumik Bhatt's avatar Bhaumik Bhatt Committed by Hemant Kumar
Browse files

mhi: cntrl: return EBUSY from runtime pm ops in error scenarios



Returning error codes other than -EBUSY or -EAGAIN from any
runtime pm registered callbacks blocks future suspend requests
from being queued. Allow those requests to get queued from auto
suspend timers by always returning -EBUSY upon errors.

Change-Id: Ie289d129cf7b4bf43e82ec263b112a1743ffd75a
Signed-off-by: default avatarBhaumik Bhatt <bbhatt@codeaurora.org>
parent 0cf43615
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -243,7 +243,7 @@ static int mhi_runtime_suspend(struct device *dev)
	mutex_unlock(&mhi_cntrl->pm_mutex);
	MHI_LOG("Exited with ret:%d\n", ret);

	return ret;
	return (ret < 0) ? -EBUSY : 0;
}

static int mhi_runtime_idle(struct device *dev)
@@ -302,7 +302,7 @@ static int mhi_runtime_resume(struct device *dev)
	mutex_unlock(&mhi_cntrl->pm_mutex);
	MHI_LOG("Exited with :%d\n", ret);

	return ret;
	return (ret < 0) ? -EBUSY : 0;
}

static int mhi_system_resume(struct device *dev)