Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
1db560af
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看板
提交
1db560af
编写于
3月 23, 2005
作者:
G
gregkh@suse.de
提交者:
Greg Kroah-Hartman
6月 20, 2005
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] class: convert the remaining class_simple users in the kernel to usee the new class api
Signed-off-by:
N
Greg Kroah-Hartman
<
gregkh@suse.de
>
上级
5cebfb75
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
9 deletion
+9
-9
fs/coda/psdev.c
fs/coda/psdev.c
+9
-9
未找到文件。
fs/coda/psdev.c
浏览文件 @
1db560af
...
@@ -61,7 +61,7 @@ unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */
...
@@ -61,7 +61,7 @@ unsigned long coda_timeout = 30; /* .. secs, then signals will dequeue */
struct
venus_comm
coda_comms
[
MAX_CODADEVS
];
struct
venus_comm
coda_comms
[
MAX_CODADEVS
];
static
struct
class
_simple
*
coda_psdev_class
;
static
struct
class
*
coda_psdev_class
;
/*
/*
* Device operations
* Device operations
...
@@ -363,14 +363,14 @@ static int init_coda_psdev(void)
...
@@ -363,14 +363,14 @@ static int init_coda_psdev(void)
CODA_PSDEV_MAJOR
);
CODA_PSDEV_MAJOR
);
return
-
EIO
;
return
-
EIO
;
}
}
coda_psdev_class
=
class_
simple_
create
(
THIS_MODULE
,
"coda"
);
coda_psdev_class
=
class_create
(
THIS_MODULE
,
"coda"
);
if
(
IS_ERR
(
coda_psdev_class
))
{
if
(
IS_ERR
(
coda_psdev_class
))
{
err
=
PTR_ERR
(
coda_psdev_class
);
err
=
PTR_ERR
(
coda_psdev_class
);
goto
out_chrdev
;
goto
out_chrdev
;
}
}
devfs_mk_dir
(
"coda"
);
devfs_mk_dir
(
"coda"
);
for
(
i
=
0
;
i
<
MAX_CODADEVS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_CODADEVS
;
i
++
)
{
class_
simple_device_add
(
coda_psdev_class
,
MKDEV
(
CODA_PSDEV_MAJOR
,
i
),
class_
device_create
(
coda_psdev_class
,
MKDEV
(
CODA_PSDEV_MAJOR
,
i
),
NULL
,
"cfs%d"
,
i
);
NULL
,
"cfs%d"
,
i
);
err
=
devfs_mk_cdev
(
MKDEV
(
CODA_PSDEV_MAJOR
,
i
),
err
=
devfs_mk_cdev
(
MKDEV
(
CODA_PSDEV_MAJOR
,
i
),
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
"coda/%d"
,
i
);
S_IFCHR
|
S_IRUSR
|
S_IWUSR
,
"coda/%d"
,
i
);
...
@@ -382,8 +382,8 @@ static int init_coda_psdev(void)
...
@@ -382,8 +382,8 @@ static int init_coda_psdev(void)
out_class:
out_class:
for
(
i
=
0
;
i
<
MAX_CODADEVS
;
i
++
)
for
(
i
=
0
;
i
<
MAX_CODADEVS
;
i
++
)
class_
simple_device_remove
(
MKDEV
(
CODA_PSDEV_MAJOR
,
i
));
class_
device_destroy
(
coda_psdev_class
,
MKDEV
(
CODA_PSDEV_MAJOR
,
i
));
class_
simple_
destroy
(
coda_psdev_class
);
class_destroy
(
coda_psdev_class
);
out_chrdev:
out_chrdev:
unregister_chrdev
(
CODA_PSDEV_MAJOR
,
"coda"
);
unregister_chrdev
(
CODA_PSDEV_MAJOR
,
"coda"
);
out:
out:
...
@@ -425,10 +425,10 @@ static int __init init_coda(void)
...
@@ -425,10 +425,10 @@ static int __init init_coda(void)
return
0
;
return
0
;
out:
out:
for
(
i
=
0
;
i
<
MAX_CODADEVS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_CODADEVS
;
i
++
)
{
class_
simple_device_remove
(
MKDEV
(
CODA_PSDEV_MAJOR
,
i
));
class_
device_destroy
(
coda_psdev_class
,
MKDEV
(
CODA_PSDEV_MAJOR
,
i
));
devfs_remove
(
"coda/%d"
,
i
);
devfs_remove
(
"coda/%d"
,
i
);
}
}
class_
simple_
destroy
(
coda_psdev_class
);
class_destroy
(
coda_psdev_class
);
devfs_remove
(
"coda"
);
devfs_remove
(
"coda"
);
unregister_chrdev
(
CODA_PSDEV_MAJOR
,
"coda"
);
unregister_chrdev
(
CODA_PSDEV_MAJOR
,
"coda"
);
coda_sysctl_clean
();
coda_sysctl_clean
();
...
@@ -447,10 +447,10 @@ static void __exit exit_coda(void)
...
@@ -447,10 +447,10 @@ static void __exit exit_coda(void)
printk
(
"coda: failed to unregister filesystem
\n
"
);
printk
(
"coda: failed to unregister filesystem
\n
"
);
}
}
for
(
i
=
0
;
i
<
MAX_CODADEVS
;
i
++
)
{
for
(
i
=
0
;
i
<
MAX_CODADEVS
;
i
++
)
{
class_
simple_device_remove
(
MKDEV
(
CODA_PSDEV_MAJOR
,
i
));
class_
device_destroy
(
coda_psdev_class
,
MKDEV
(
CODA_PSDEV_MAJOR
,
i
));
devfs_remove
(
"coda/%d"
,
i
);
devfs_remove
(
"coda/%d"
,
i
);
}
}
class_
simple_
destroy
(
coda_psdev_class
);
class_destroy
(
coda_psdev_class
);
devfs_remove
(
"coda"
);
devfs_remove
(
"coda"
);
unregister_chrdev
(
CODA_PSDEV_MAJOR
,
"coda"
);
unregister_chrdev
(
CODA_PSDEV_MAJOR
,
"coda"
);
coda_sysctl_clean
();
coda_sysctl_clean
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录