Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
gsplhtlxg
clone-Linux
提交
7e25ab91
C
clone-Linux
项目概览
gsplhtlxg
/
clone-Linux
通知
2
Star
0
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
clone-Linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7e25ab91
编写于
3月 23, 2005
作者:
G
gregkh@suse.de
提交者:
Greg Kroah-Hartman
6月 20, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] class: convert drivers/ieee1394/* to use the new class api instead of class_simple
Signed-off-by:
N
Greg Kroah-Hartman
<
gregkh@suse.de
>
上级
ca8eca68
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
15 deletion
+16
-15
drivers/ieee1394/dv1394.c
drivers/ieee1394/dv1394.c
+3
-3
drivers/ieee1394/ieee1394_core.c
drivers/ieee1394/ieee1394_core.c
+4
-4
drivers/ieee1394/ieee1394_core.h
drivers/ieee1394/ieee1394_core.h
+2
-1
drivers/ieee1394/raw1394.c
drivers/ieee1394/raw1394.c
+5
-5
drivers/ieee1394/video1394.c
drivers/ieee1394/video1394.c
+2
-2
未找到文件。
drivers/ieee1394/dv1394.c
浏览文件 @
7e25ab91
...
...
@@ -2343,8 +2343,8 @@ static void dv1394_remove_host (struct hpsb_host *host)
dv1394_un_init
(
video
);
}
while
(
video
!=
NULL
);
class_
simple_device_remove
(
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_DV1394
*
16
+
(
id
<<
2
)));
class_
device_destroy
(
hpsb_protocol_class
,
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_DV1394
*
16
+
(
id
<<
2
)));
devfs_remove
(
"ieee1394/dv/host%d/NTSC"
,
id
);
devfs_remove
(
"ieee1394/dv/host%d/PAL"
,
id
);
devfs_remove
(
"ieee1394/dv/host%d"
,
id
);
...
...
@@ -2361,7 +2361,7 @@ static void dv1394_add_host (struct hpsb_host *host)
ohci
=
(
struct
ti_ohci
*
)
host
->
hostdata
;
class_
simple_device_add
(
hpsb_protocol_class
,
MKDEV
(
class_
device_create
(
hpsb_protocol_class
,
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_DV1394
*
16
+
(
id
<<
2
)),
NULL
,
"dv1394-%d"
,
id
);
devfs_mk_dir
(
"ieee1394/dv/host%d"
,
id
);
...
...
drivers/ieee1394/ieee1394_core.c
浏览文件 @
7e25ab91
...
...
@@ -67,7 +67,7 @@ MODULE_LICENSE("GPL");
/* Some globals used */
const
char
*
hpsb_speedto_str
[]
=
{
"S100"
,
"S200"
,
"S400"
,
"S800"
,
"S1600"
,
"S3200"
};
struct
class
_simple
*
hpsb_protocol_class
;
struct
class
*
hpsb_protocol_class
;
#ifdef CONFIG_IEEE1394_VERBOSEDEBUG
static
void
dump_packet
(
const
char
*
text
,
quadlet_t
*
data
,
int
size
)
...
...
@@ -1121,7 +1121,7 @@ static int __init ieee1394_init(void)
if
(
ret
<
0
)
goto
release_all_bus
;
hpsb_protocol_class
=
class_
simple_
create
(
THIS_MODULE
,
"ieee1394_protocol"
);
hpsb_protocol_class
=
class_create
(
THIS_MODULE
,
"ieee1394_protocol"
);
if
(
IS_ERR
(
hpsb_protocol_class
))
{
ret
=
PTR_ERR
(
hpsb_protocol_class
);
goto
release_class_host
;
...
...
@@ -1159,7 +1159,7 @@ static int __init ieee1394_init(void)
cleanup_csr:
cleanup_csr
();
release_class_protocol:
class_
simple_
destroy
(
hpsb_protocol_class
);
class_destroy
(
hpsb_protocol_class
);
release_class_host:
class_unregister
(
&
hpsb_host_class
);
release_all_bus:
...
...
@@ -1189,7 +1189,7 @@ static void __exit ieee1394_cleanup(void)
cleanup_csr
();
class_
simple_
destroy
(
hpsb_protocol_class
);
class_destroy
(
hpsb_protocol_class
);
class_unregister
(
&
hpsb_host_class
);
for
(
i
=
0
;
fw_bus_attrs
[
i
];
i
++
)
bus_remove_file
(
&
ieee1394_bus_type
,
fw_bus_attrs
[
i
]);
...
...
drivers/ieee1394/ieee1394_core.h
浏览文件 @
7e25ab91
...
...
@@ -223,6 +223,7 @@ extern int hpsb_disable_irm;
/* Our sysfs bus entry */
extern
struct
bus_type
ieee1394_bus_type
;
extern
struct
class
hpsb_host_class
;
extern
struct
class
_simple
*
hpsb_protocol_class
;
extern
struct
class
*
hpsb_protocol_class
;
#endif
/* _IEEE1394_CORE_H */
drivers/ieee1394/raw1394.c
浏览文件 @
7e25ab91
...
...
@@ -2901,7 +2901,7 @@ static int __init init_raw1394(void)
hpsb_register_highlevel
(
&
raw1394_highlevel
);
if
(
IS_ERR
(
class_
simple_device_add
(
hpsb_protocol_class
,
MKDEV
(
if
(
IS_ERR
(
class_
device_create
(
hpsb_protocol_class
,
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_RAW1394
*
16
),
NULL
,
RAW1394_DEVICE_NAME
)))
{
ret
=
-
EFAULT
;
...
...
@@ -2934,8 +2934,8 @@ static int __init init_raw1394(void)
out_dev:
devfs_remove
(
RAW1394_DEVICE_NAME
);
class_
simple_device_remove
(
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_RAW1394
*
16
));
class_
device_destroy
(
hpsb_protocol_class
,
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_RAW1394
*
16
));
out_unreg:
hpsb_unregister_highlevel
(
&
raw1394_highlevel
);
out:
...
...
@@ -2944,8 +2944,8 @@ static int __init init_raw1394(void)
static
void
__exit
cleanup_raw1394
(
void
)
{
class_
simple_device_remove
(
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_RAW1394
*
16
));
class_
device_destroy
(
hpsb_protocol_class
,
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_RAW1394
*
16
));
cdev_del
(
&
raw1394_cdev
);
devfs_remove
(
RAW1394_DEVICE_NAME
);
hpsb_unregister_highlevel
(
&
raw1394_highlevel
);
...
...
drivers/ieee1394/video1394.c
浏览文件 @
7e25ab91
...
...
@@ -1370,7 +1370,7 @@ static void video1394_add_host (struct hpsb_host *host)
hpsb_set_hostinfo_key
(
&
video1394_highlevel
,
host
,
ohci
->
host
->
id
);
minor
=
IEEE1394_MINOR_BLOCK_VIDEO1394
*
16
+
ohci
->
host
->
id
;
class_
simple_device_add
(
hpsb_protocol_class
,
MKDEV
(
class_
device_create
(
hpsb_protocol_class
,
MKDEV
(
IEEE1394_MAJOR
,
minor
),
NULL
,
"%s-%d"
,
VIDEO1394_DRIVER_NAME
,
ohci
->
host
->
id
);
devfs_mk_cdev
(
MKDEV
(
IEEE1394_MAJOR
,
minor
),
...
...
@@ -1384,7 +1384,7 @@ static void video1394_remove_host (struct hpsb_host *host)
struct
ti_ohci
*
ohci
=
hpsb_get_hostinfo
(
&
video1394_highlevel
,
host
);
if
(
ohci
)
{
class_
simple_device_remove
(
MKDEV
(
IEEE1394_MAJOR
,
class_
device_destroy
(
hpsb_protocol_class
,
MKDEV
(
IEEE1394_MAJOR
,
IEEE1394_MINOR_BLOCK_VIDEO1394
*
16
+
ohci
->
host
->
id
));
devfs_remove
(
"%s/%d"
,
VIDEO1394_DRIVER_NAME
,
ohci
->
host
->
id
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录