File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -428,7 +428,8 @@ drivers/base/power/runtime.c and include/linux/pm_runtime.h:
428428 pm_runtime_suspend(dev) and return its result
429429
430430 `int pm_runtime_put_sync_autosuspend(struct device *dev); `
431- - decrement the device's usage counter; if the result is 0 then run
431+ - set the power.last_busy field to the current time and decrement the
432+ device's usage counter; if the result is 0 then run
432433 pm_runtime_autosuspend(dev) and return its result
433434
434435 `void pm_runtime_enable(struct device *dev); `
Original file line number Diff line number Diff line change @@ -651,12 +651,14 @@ static inline int pm_runtime_put_sync_suspend(struct device *dev)
651651}
652652
653653/**
654- * pm_runtime_put_sync_autosuspend - Drop device usage counter and autosuspend if 0.
654+ * pm_runtime_put_sync_autosuspend - Update the last access time of a device,
655+ * drop device usage counter and autosuspend if 0.
655656 * @dev: Target device.
656657 *
657- * Decrement the runtime PM usage counter of @dev and if it turns out to be
658- * equal to 0, set up autosuspend of @dev or suspend it synchronously (depending
659- * on whether or not autosuspend has been enabled for it).
658+ * Update the last access time of @dev, decrement the runtime PM usage counter
659+ * of @dev and if it turns out to be equal to 0, set up autosuspend of @dev or
660+ * suspend it synchronously (depending on whether or not autosuspend has been
661+ * enabled for it).
660662 *
661663 * The runtime PM usage counter of @dev remains decremented in all cases, even
662664 * if it returns an error code.
@@ -676,6 +678,7 @@ static inline int pm_runtime_put_sync_suspend(struct device *dev)
676678 */
677679static inline int pm_runtime_put_sync_autosuspend (struct device * dev )
678680{
681+ pm_runtime_mark_last_busy (dev );
679682 return __pm_runtime_suspend (dev , RPM_GET_PUT | RPM_AUTO );
680683}
681684
You can’t perform that action at this time.
0 commit comments