linux-2.6.33/__pm_request_resume()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#j08c2a28]
#backlinks
*説明 [#n7fb75c5]
-パス: [[linux-2.6.33/drivers/base/power/runtime.c]]
-FIXME: これは何?
--説明
**引数 [#n27455f0]
-struct device *dev
--
--[[linux-2.6.33/device]]
**返り値 [#tb1b48ab]
-int
--
**参考 [#eb79c992]
*実装 [#v0ee9db9]
/**
* pm_request_resume - Submit a resume request for given...
* @dev: Device to resume.
*
* This function must be called under dev->power.lock wi...
*/
static int __pm_request_resume(struct device *dev)
{
int retval = 0;
if (dev->power.runtime_error)
return -EINVAL;
if (dev->power.runtime_status == RPM_ACTIVE)
retval = 1;
else if (dev->power.runtime_status == RPM_RESUMING)
retval = -EINPROGRESS;
else if (dev->power.disable_depth > 0)
retval = -EAGAIN;
if (retval < 0)
return retval;
pm_runtime_deactivate_timer(dev);
-
--[[linux-2.6.33/pm_runtime_deactivate_timer()]]
if (dev->power.runtime_status == RPM_SUSPENDING) {
dev->power.deferred_resume = true;
return retval;
}
if (dev->power.request_pending) {
/* If non-resume request is pending, we can overtake i...
dev->power.request = retval ? RPM_REQ_NONE : RPM_REQ_R...
return retval;
}
if (retval)
return retval;
dev->power.request = RPM_REQ_RESUME;
dev->power.request_pending = true;
queue_work(pm_wq, &dev->power.work);
-
--[[linux-2.6.33/queue_work()]]
return retval;
}
*コメント [#hd4ed525]
終了行:
*参照元 [#j08c2a28]
#backlinks
*説明 [#n7fb75c5]
-パス: [[linux-2.6.33/drivers/base/power/runtime.c]]
-FIXME: これは何?
--説明
**引数 [#n27455f0]
-struct device *dev
--
--[[linux-2.6.33/device]]
**返り値 [#tb1b48ab]
-int
--
**参考 [#eb79c992]
*実装 [#v0ee9db9]
/**
* pm_request_resume - Submit a resume request for given...
* @dev: Device to resume.
*
* This function must be called under dev->power.lock wi...
*/
static int __pm_request_resume(struct device *dev)
{
int retval = 0;
if (dev->power.runtime_error)
return -EINVAL;
if (dev->power.runtime_status == RPM_ACTIVE)
retval = 1;
else if (dev->power.runtime_status == RPM_RESUMING)
retval = -EINPROGRESS;
else if (dev->power.disable_depth > 0)
retval = -EAGAIN;
if (retval < 0)
return retval;
pm_runtime_deactivate_timer(dev);
-
--[[linux-2.6.33/pm_runtime_deactivate_timer()]]
if (dev->power.runtime_status == RPM_SUSPENDING) {
dev->power.deferred_resume = true;
return retval;
}
if (dev->power.request_pending) {
/* If non-resume request is pending, we can overtake i...
dev->power.request = retval ? RPM_REQ_NONE : RPM_REQ_R...
return retval;
}
if (retval)
return retval;
dev->power.request = RPM_REQ_RESUME;
dev->power.request_pending = true;
queue_work(pm_wq, &dev->power.work);
-
--[[linux-2.6.33/queue_work()]]
return retval;
}
*コメント [#hd4ed525]
ページ名: