参照元

説明

引数

返り値

参考

実装 drivers/base/power/runtime.c

/**
 * __pm_runtime_get - Reference count a device and wake it up, if necessary.
 * @dev: Device to handle.
 * @sync: If set and the device is suspended, resume it synchronously.
 *
 * Increment the usage count of the device and resume it or submit a resume
 * request for it, depending on the value of @sync.
 */
int __pm_runtime_get(struct device *dev, bool sync)
{
	int retval;

	atomic_inc(&dev->power.usage_count);
	retval = sync ? pm_runtime_resume(dev) : pm_request_resume(dev);
	return retval;
}
EXPORT_SYMBOL_GPL(__pm_runtime_get);

実装 include/linux/pm_runtime.h

#ifdef CONFIG_PM_RUNTIME
(...snip...)
extern int __pm_runtime_get(struct device *dev, bool sync);
(...snip...)
#else /* !CONFIG_PM_RUNTIME */
(...snip...)
static inline int __pm_runtime_get(struct device *dev, bool sync) { return 1; }
(...snip...)
#endif /* !CONFIG_PM_RUNTIME */

コメント


トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2014-09-13 (土) 08:26:40