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:
428
428
pm_runtime_suspend(dev) and return its result
429
429
430
430
`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
432
433
pm_runtime_autosuspend(dev) and return its result
433
434
434
435
`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)
651
651
}
652
652
653
653
/**
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.
655
656
* @dev: Target device.
656
657
*
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).
660
662
*
661
663
* The runtime PM usage counter of @dev remains decremented in all cases, even
662
664
* if it returns an error code.
@@ -676,6 +678,7 @@ static inline int pm_runtime_put_sync_suspend(struct device *dev)
676
678
*/
677
679
static inline int pm_runtime_put_sync_autosuspend (struct device * dev )
678
680
{
681
+ pm_runtime_mark_last_busy (dev );
679
682
return __pm_runtime_suspend (dev , RPM_GET_PUT | RPM_AUTO );
680
683
}
681
684
You can’t perform that action at this time.
0 commit comments