Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
aed80892
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看板
提交
aed80892
编写于
1月 17, 2009
作者:
S
Stefan Richter
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
firewire: core: move some functions
Signed-off-by:
N
Stefan Richter
<
stefanr@s5r6.in-berlin.de
>
上级
41f321c2
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
44 addition
and
46 deletion
+44
-46
drivers/firewire/fw-device.c
drivers/firewire/fw-device.c
+44
-46
未找到文件。
drivers/firewire/fw-device.c
浏览文件 @
aed80892
...
...
@@ -155,27 +155,6 @@ struct bus_type fw_bus_type = {
};
EXPORT_SYMBOL
(
fw_bus_type
);
static
void
fw_device_release
(
struct
device
*
dev
)
{
struct
fw_device
*
device
=
fw_device
(
dev
);
struct
fw_card
*
card
=
device
->
card
;
unsigned
long
flags
;
/*
* Take the card lock so we don't set this to NULL while a
* FW_NODE_UPDATED callback is being handled or while the
* bus manager work looks at this node.
*/
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
device
->
node
->
data
=
NULL
;
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
fw_node_put
(
device
->
node
);
kfree
(
device
->
config_rom
);
kfree
(
device
);
fw_card_put
(
card
);
}
int
fw_device_enable_phys_dma
(
struct
fw_device
*
device
)
{
int
generation
=
device
->
generation
;
...
...
@@ -679,11 +658,53 @@ static void fw_device_shutdown(struct work_struct *work)
fw_device_put
(
device
);
}
static
void
fw_device_release
(
struct
device
*
dev
)
{
struct
fw_device
*
device
=
fw_device
(
dev
);
struct
fw_card
*
card
=
device
->
card
;
unsigned
long
flags
;
/*
* Take the card lock so we don't set this to NULL while a
* FW_NODE_UPDATED callback is being handled or while the
* bus manager work looks at this node.
*/
spin_lock_irqsave
(
&
card
->
lock
,
flags
);
device
->
node
->
data
=
NULL
;
spin_unlock_irqrestore
(
&
card
->
lock
,
flags
);
fw_node_put
(
device
->
node
);
kfree
(
device
->
config_rom
);
kfree
(
device
);
fw_card_put
(
card
);
}
static
struct
device_type
fw_device_type
=
{
.
release
=
fw_device_release
,
.
release
=
fw_device_release
,
};
static
void
fw_device_update
(
struct
work_struct
*
work
);
static
int
update_unit
(
struct
device
*
dev
,
void
*
data
)
{
struct
fw_unit
*
unit
=
fw_unit
(
dev
);
struct
fw_driver
*
driver
=
(
struct
fw_driver
*
)
dev
->
driver
;
if
(
is_fw_unit
(
dev
)
&&
driver
!=
NULL
&&
driver
->
update
!=
NULL
)
{
down
(
&
dev
->
sem
);
driver
->
update
(
unit
);
up
(
&
dev
->
sem
);
}
return
0
;
}
static
void
fw_device_update
(
struct
work_struct
*
work
)
{
struct
fw_device
*
device
=
container_of
(
work
,
struct
fw_device
,
work
.
work
);
fw_device_cdev_update
(
device
);
device_for_each_child
(
&
device
->
device
,
NULL
,
update_unit
);
}
/*
* If a device was pending for deletion because its node went away but its
...
...
@@ -851,29 +872,6 @@ static void fw_device_init(struct work_struct *work)
put_device
(
&
device
->
device
);
/* our reference */
}
static
int
update_unit
(
struct
device
*
dev
,
void
*
data
)
{
struct
fw_unit
*
unit
=
fw_unit
(
dev
);
struct
fw_driver
*
driver
=
(
struct
fw_driver
*
)
dev
->
driver
;
if
(
is_fw_unit
(
dev
)
&&
driver
!=
NULL
&&
driver
->
update
!=
NULL
)
{
down
(
&
dev
->
sem
);
driver
->
update
(
unit
);
up
(
&
dev
->
sem
);
}
return
0
;
}
static
void
fw_device_update
(
struct
work_struct
*
work
)
{
struct
fw_device
*
device
=
container_of
(
work
,
struct
fw_device
,
work
.
work
);
fw_device_cdev_update
(
device
);
device_for_each_child
(
&
device
->
device
,
NULL
,
update_unit
);
}
enum
{
REREAD_BIB_ERROR
,
REREAD_BIB_GONE
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录