Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
641f8791
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
641f8791
编写于
1月 27, 2007
作者:
S
Stefan Richter
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
firewire: use atomic type for fw_device.state
Signed-off-by:
N
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
上级
0edeefd9
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
6 addition
and
5 deletion
+6
-5
drivers/firewire/fw-card.c
drivers/firewire/fw-card.c
+1
-1
drivers/firewire/fw-device.c
drivers/firewire/fw-device.c
+3
-3
drivers/firewire/fw-device.h
drivers/firewire/fw-device.h
+2
-1
未找到文件。
drivers/firewire/fw-card.c
浏览文件 @
641f8791
...
...
@@ -302,7 +302,7 @@ fw_card_bm_work(struct work_struct *work)
/* Either link_on is false, or we failed to read the
* config rom. In either case, pick another root. */
new_root_id
=
card
->
local_node
->
node_id
;
}
else
if
(
root
->
state
!=
FW_DEVICE_RUNNING
)
{
}
else
if
(
atomic_read
(
&
root
->
state
)
!=
FW_DEVICE_RUNNING
)
{
/* If we haven't probed this device yet, bail out now
* and let's try again once that's done. */
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
...
...
drivers/firewire/fw-device.c
浏览文件 @
641f8791
...
...
@@ -494,7 +494,7 @@ static void fw_device_init(struct work_struct *work)
* necessary. We have to use the atomic cmpxchg here to avoid
* racing with the FW_NODE_DESTROYED case in
* fw_node_event(). */
if
(
cmpxchg
(
&
device
->
state
,
if
(
atomic_
cmpxchg
(
&
device
->
state
,
FW_DEVICE_INITIALIZING
,
FW_DEVICE_RUNNING
)
==
FW_DEVICE_SHUTDOWN
)
fw_device_shutdown
(
&
device
->
work
.
work
);
...
...
@@ -551,7 +551,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
* device_for_each_child() in FW_NODE_UPDATED is
* doesn't freak out. */
device_initialize
(
&
device
->
device
);
device
->
state
=
FW_DEVICE_INITIALIZING
;
atomic_set
(
&
device
->
state
,
FW_DEVICE_INITIALIZING
)
;
device
->
card
=
fw_card_get
(
card
);
device
->
node
=
fw_node_get
(
node
);
device
->
node_id
=
node
->
node_id
;
...
...
@@ -596,7 +596,7 @@ void fw_node_event(struct fw_card *card, struct fw_node *node, int event)
* the device in shutdown state to have that code fail
* to create the device. */
device
=
node
->
data
;
if
(
xchg
(
&
device
->
state
,
if
(
atomic_
xchg
(
&
device
->
state
,
FW_DEVICE_SHUTDOWN
)
==
FW_DEVICE_RUNNING
)
{
INIT_DELAYED_WORK
(
&
device
->
work
,
fw_device_shutdown
);
schedule_delayed_work
(
&
device
->
work
,
0
);
...
...
drivers/firewire/fw-device.h
浏览文件 @
641f8791
...
...
@@ -24,6 +24,7 @@
#include <linux/fs.h>
#include <linux/cdev.h>
#include <asm/atomic.h>
enum
fw_device_state
{
FW_DEVICE_INITIALIZING
,
...
...
@@ -32,7 +33,7 @@ enum fw_device_state {
};
struct
fw_device
{
in
t
state
;
atomic_
t
state
;
struct
fw_node
*
node
;
int
node_id
;
int
generation
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录