Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
af0e2a0a
Commit
af0e2a0a
authored
Mar 02, 2008
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] switch mtd_blkdevs
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
a5a1561f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
drivers/mtd/mtd_blkdevs.c
drivers/mtd/mtd_blkdevs.c
+11
-17
No files found.
drivers/mtd/mtd_blkdevs.c
View file @
af0e2a0a
...
...
@@ -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_ops
*
tr
;
struct
mtd_blktrans_dev
*
dev
=
bdev
->
bd_disk
->
private_data
;
struct
mtd_blktrans_ops
*
tr
=
dev
->
tr
;
int
ret
=
-
ENODEV
;
dev
=
i
->
i_bdev
->
bd_disk
->
private_data
;
tr
=
dev
->
tr
;
if
(
!
try_module_get
(
dev
->
mtd
->
owner
))
goto
out
;
...
...
@@ -164,15 +161,12 @@ static int blktrans_open(struct inode *i, struct file *f)
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_ops
*
tr
;
struct
mtd_blktrans_dev
*
dev
=
disk
->
private_data
;
struct
mtd_blktrans_ops
*
tr
=
dev
->
tr
;
int
ret
=
0
;
dev
=
i
->
i_bdev
->
bd_disk
->
private_data
;
tr
=
dev
->
tr
;
if
(
tr
->
release
)
ret
=
tr
->
release
(
dev
);
...
...
@@ -194,10 +188,10 @@ static int blktrans_getgeo(struct block_device *bdev, struct hd_geometry *geo)
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
)
{
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
;
switch
(
cmd
)
{
...
...
@@ -213,9 +207,9 @@ static int blktrans_ioctl(struct inode *inode, struct file *file,
static
struct
block_device_operations
mtd_blktrans_ops
=
{
.
owner
=
THIS_MODULE
,
.
__
open
=
blktrans_open
,
.
__
release
=
blktrans_release
,
.
__ioctl
=
blktrans_ioctl
,
.
open
=
blktrans_open
,
.
release
=
blktrans_release
,
.
locked_ioctl
=
blktrans_ioctl
,
.
getgeo
=
blktrans_getgeo
,
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment