Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
3fc7aeeb
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
3fc7aeeb
编写于
7月 07, 2015
作者:
R
Rafael J. Wysocki
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'pm-wakeirq'
* pm-wakeirq: PM / wakeirq: Avoid setting power.wakeirq too hastily
上级
d770e558
6d3dab7d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
28 deletion
+15
-28
drivers/base/power/wakeirq.c
drivers/base/power/wakeirq.c
+5
-7
drivers/base/power/wakeup.c
drivers/base/power/wakeup.c
+10
-21
未找到文件。
drivers/base/power/wakeirq.c
浏览文件 @
3fc7aeeb
...
...
@@ -45,14 +45,12 @@ static int dev_pm_attach_wake_irq(struct device *dev, int irq,
return
-
EEXIST
;
}
dev
->
power
.
wakeirq
=
wirq
;
spin_unlock_irqrestore
(
&
dev
->
power
.
lock
,
flags
);
err
=
device_wakeup_attach_irq
(
dev
,
wirq
);
if
(
err
)
return
err
;
if
(
!
err
)
dev
->
power
.
wakeirq
=
wirq
;
return
0
;
spin_unlock_irqrestore
(
&
dev
->
power
.
lock
,
flags
);
return
err
;
}
/**
...
...
@@ -105,10 +103,10 @@ void dev_pm_clear_wake_irq(struct device *dev)
return
;
spin_lock_irqsave
(
&
dev
->
power
.
lock
,
flags
);
device_wakeup_detach_irq
(
dev
);
dev
->
power
.
wakeirq
=
NULL
;
spin_unlock_irqrestore
(
&
dev
->
power
.
lock
,
flags
);
device_wakeup_detach_irq
(
dev
);
if
(
wirq
->
dedicated_irq
)
free_irq
(
wirq
->
irq
,
wirq
);
kfree
(
wirq
);
...
...
drivers/base/power/wakeup.c
浏览文件 @
3fc7aeeb
...
...
@@ -281,32 +281,25 @@ EXPORT_SYMBOL_GPL(device_wakeup_enable);
* Attach a device wakeirq to the wakeup source so the device
* wake IRQ can be configured automatically for suspend and
* resume.
*
* Call under the device's power.lock lock.
*/
int
device_wakeup_attach_irq
(
struct
device
*
dev
,
struct
wake_irq
*
wakeirq
)
{
struct
wakeup_source
*
ws
;
int
ret
=
0
;
spin_lock_irq
(
&
dev
->
power
.
lock
);
ws
=
dev
->
power
.
wakeup
;
if
(
!
ws
)
{
dev_err
(
dev
,
"forgot to call call device_init_wakeup?
\n
"
);
ret
=
-
EINVAL
;
goto
unlock
;
return
-
EINVAL
;
}
if
(
ws
->
wakeirq
)
{
ret
=
-
EEXIST
;
goto
unlock
;
}
if
(
ws
->
wakeirq
)
return
-
EEXIST
;
ws
->
wakeirq
=
wakeirq
;
unlock:
spin_unlock_irq
(
&
dev
->
power
.
lock
);
return
ret
;
return
0
;
}
/**
...
...
@@ -314,20 +307,16 @@ int device_wakeup_attach_irq(struct device *dev,
* @dev: Device to handle
*
* Removes a device wakeirq from the wakeup source.
*
* Call under the device's power.lock lock.
*/
void
device_wakeup_detach_irq
(
struct
device
*
dev
)
{
struct
wakeup_source
*
ws
;
spin_lock_irq
(
&
dev
->
power
.
lock
);
ws
=
dev
->
power
.
wakeup
;
if
(
!
ws
)
goto
unlock
;
ws
->
wakeirq
=
NULL
;
unlock:
spin_unlock_irq
(
&
dev
->
power
.
lock
);
if
(
ws
)
ws
->
wakeirq
=
NULL
;
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录