@@ -90,7 +90,7 @@ static void update_pm_runtime_accounting(struct device *dev)
9090 /*
9191 * Because ktime_get_mono_fast_ns() is not monotonic during
9292 * timekeeping updates, ensure that 'now' is after the last saved
93- * timesptamp .
93+ * timestamp .
9494 */
9595 if (now < last )
9696 return ;
@@ -217,7 +217,7 @@ static int dev_memalloc_noio(struct device *dev, void *data)
217217 * resume/suspend callback of any one of its ancestors(or the
218218 * block device itself), the deadlock may be triggered inside the
219219 * memory allocation since it might not complete until the block
220- * device becomes active and the involed page I/O finishes. The
220+ * device becomes active and the involved page I/O finishes. The
221221 * situation is pointed out first by Alan Stern. Network device
222222 * are involved in iSCSI kind of situation.
223223 *
@@ -1210,7 +1210,7 @@ EXPORT_SYMBOL_GPL(__pm_runtime_resume);
12101210 *
12111211 * Otherwise, if its runtime PM status is %RPM_ACTIVE and (1) @ign_usage_count
12121212 * is set, or (2) @dev is not ignoring children and its active child count is
1213- * nonero , or (3) the runtime PM usage counter of @dev is not zero, increment
1213+ * nonzero , or (3) the runtime PM usage counter of @dev is not zero, increment
12141214 * the usage counter of @dev and return 1.
12151215 *
12161216 * Otherwise, return 0 without changing the usage counter.
@@ -1664,9 +1664,12 @@ EXPORT_SYMBOL_GPL(devm_pm_runtime_get_noresume);
16641664 * pm_runtime_forbid - Block runtime PM of a device.
16651665 * @dev: Device to handle.
16661666 *
1667- * Increase the device's usage count and clear its power.runtime_auto flag,
1668- * so that it cannot be suspended at run time until pm_runtime_allow() is called
1669- * for it.
1667+ * Resume @dev if already suspended and block runtime suspend of @dev in such
1668+ * a way that it can be unblocked via the /sys/devices/.../power/control
1669+ * interface, or otherwise by calling pm_runtime_allow().
1670+ *
1671+ * Calling this function many times in a row has the same effect as calling it
1672+ * once.
16701673 */
16711674void pm_runtime_forbid (struct device * dev )
16721675{
@@ -1687,7 +1690,13 @@ EXPORT_SYMBOL_GPL(pm_runtime_forbid);
16871690 * pm_runtime_allow - Unblock runtime PM of a device.
16881691 * @dev: Device to handle.
16891692 *
1690- * Decrease the device's usage count and set its power.runtime_auto flag.
1693+ * Unblock runtime suspend of @dev after it has been blocked by
1694+ * pm_runtime_forbid() (for instance, if it has been blocked via the
1695+ * /sys/devices/.../power/control interface), check if @dev can be
1696+ * suspended and suspend it in that case.
1697+ *
1698+ * Calling this function many times in a row has the same effect as calling it
1699+ * once.
16911700 */
16921701void pm_runtime_allow (struct device * dev )
16931702{
0 commit comments