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

Commit d83f905e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

PM: Use pm_wakeup_pending() in __device_suspend()



Before starting to suspend a device in __device_suspend() check if
there's a request to abort the power transition and return -EBUSY
in that case.

Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent a2867e08
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -877,6 +877,11 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
	if (async_error)
		goto End;

	if (pm_wakeup_pending()) {
		async_error = -EBUSY;
		goto End;
	}

	if (dev->class) {
		if (dev->class->pm) {
			pm_dev_dbg(dev, state, "class ");