Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
af0e2a0a
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看板
提交
af0e2a0a
编写于
3月 02, 2008
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] switch mtd_blkdevs
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
a5a1561f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
17 deletion
+11
-17
drivers/mtd/mtd_blkdevs.c
drivers/mtd/mtd_blkdevs.c
+11
-17
未找到文件。
drivers/mtd/mtd_blkdevs.c
浏览文件 @
af0e2a0a
...
@@ -133,15 +133,12 @@ static void mtd_blktrans_request(struct request_queue *rq)
...
@@ -133,15 +133,12 @@ static void mtd_blktrans_request(struct request_queue *rq)
}
}
static
int
blktrans_open
(
struct
inode
*
i
,
struct
file
*
f
)
static
int
blktrans_open
(
struct
block_device
*
bdev
,
fmode_t
mode
)
{
{
struct
mtd_blktrans_dev
*
dev
;
struct
mtd_blktrans_dev
*
dev
=
bdev
->
bd_disk
->
private_data
;
struct
mtd_blktrans_ops
*
tr
;
struct
mtd_blktrans_ops
*
tr
=
dev
->
tr
;
int
ret
=
-
ENODEV
;
int
ret
=
-
ENODEV
;
dev
=
i
->
i_bdev
->
bd_disk
->
private_data
;
tr
=
dev
->
tr
;
if
(
!
try_module_get
(
dev
->
mtd
->
owner
))
if
(
!
try_module_get
(
dev
->
mtd
->
owner
))
goto
out
;
goto
out
;
...
@@ -164,15 +161,12 @@ static int blktrans_open(struct inode *i, struct file *f)
...
@@ -164,15 +161,12 @@ static int blktrans_open(struct inode *i, struct file *f)
return
ret
;
return
ret
;
}
}
static
int
blktrans_release
(
struct
inode
*
i
,
struct
file
*
f
)
static
int
blktrans_release
(
struct
gendisk
*
disk
,
fmode_t
mode
)
{
{
struct
mtd_blktrans_dev
*
dev
;
struct
mtd_blktrans_dev
*
dev
=
disk
->
private_data
;
struct
mtd_blktrans_ops
*
tr
;
struct
mtd_blktrans_ops
*
tr
=
dev
->
tr
;
int
ret
=
0
;
int
ret
=
0
;
dev
=
i
->
i_bdev
->
bd_disk
->
private_data
;
tr
=
dev
->
tr
;
if
(
tr
->
release
)
if
(
tr
->
release
)
ret
=
tr
->
release
(
dev
);
ret
=
tr
->
release
(
dev
);
...
@@ -194,10 +188,10 @@ static int blktrans_getgeo(struct block_device *bdev, struct hd_geometry *geo)
...
@@ -194,10 +188,10 @@ static int blktrans_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return
-
ENOTTY
;
return
-
ENOTTY
;
}
}
static
int
blktrans_ioctl
(
struct
inode
*
inode
,
struct
file
*
fil
e
,
static
int
blktrans_ioctl
(
struct
block_device
*
bdev
,
fmode_t
mod
e
,
unsigned
int
cmd
,
unsigned
long
arg
)
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
struct
mtd_blktrans_dev
*
dev
=
inode
->
i_
bdev
->
bd_disk
->
private_data
;
struct
mtd_blktrans_dev
*
dev
=
bdev
->
bd_disk
->
private_data
;
struct
mtd_blktrans_ops
*
tr
=
dev
->
tr
;
struct
mtd_blktrans_ops
*
tr
=
dev
->
tr
;
switch
(
cmd
)
{
switch
(
cmd
)
{
...
@@ -213,9 +207,9 @@ static int blktrans_ioctl(struct inode *inode, struct file *file,
...
@@ -213,9 +207,9 @@ static int blktrans_ioctl(struct inode *inode, struct file *file,
static
struct
block_device_operations
mtd_blktrans_ops
=
{
static
struct
block_device_operations
mtd_blktrans_ops
=
{
.
owner
=
THIS_MODULE
,
.
owner
=
THIS_MODULE
,
.
__
open
=
blktrans_open
,
.
open
=
blktrans_open
,
.
__
release
=
blktrans_release
,
.
release
=
blktrans_release
,
.
__ioctl
=
blktrans_ioctl
,
.
locked_ioctl
=
blktrans_ioctl
,
.
getgeo
=
blktrans_getgeo
,
.
getgeo
=
blktrans_getgeo
,
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录