Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
0b71bb7f
Commit
0b71bb7f
authored
Oct 12, 2002
by
Alan Cox
Committed by
Linus Torvalds
Oct 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] some mtdblock_ro fixes
parent
70f7a7d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
drivers/mtd/mtdblock_ro.c
drivers/mtd/mtdblock_ro.c
+4
-2
No files found.
drivers/mtd/mtdblock_ro.c
View file @
0b71bb7f
...
@@ -15,6 +15,8 @@
...
@@ -15,6 +15,8 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/compatmac.h>
#include <linux/mtd/compatmac.h>
#include <linux/buffer_head.h>
#include <linux/genhd.h>
#define LOCAL_END_REQUEST
#define LOCAL_END_REQUEST
#define MAJOR_NR MTD_BLOCK_MAJOR
#define MAJOR_NR MTD_BLOCK_MAJOR
...
@@ -47,7 +49,7 @@ static int mtdblock_open(struct inode *inode, struct file *file)
...
@@ -47,7 +49,7 @@ static int mtdblock_open(struct inode *inode, struct file *file)
return
-
EINVAL
;
return
-
EINVAL
;
}
}
set_capacit
(
disk
,
mtd
->
size
>>
9
);
set_capacit
y
(
disk
,
mtd
->
size
>>
9
);
add_disk
(
disk
);
add_disk
(
disk
);
DEBUG
(
1
,
"ok
\n
"
);
DEBUG
(
1
,
"ok
\n
"
);
...
@@ -119,7 +121,7 @@ static void mtdblock_request(RQFUNC_ARG)
...
@@ -119,7 +121,7 @@ static void mtdblock_request(RQFUNC_ARG)
mtd
=
__get_mtd_device
(
NULL
,
minor
(
current_request
->
rq_dev
));
mtd
=
__get_mtd_device
(
NULL
,
minor
(
current_request
->
rq_dev
));
if
(
!
mtd
)
{
if
(
!
mtd
)
{
printk
(
"MTD device %
d doesn't appear to exist any more
\n
"
,
DEVICE_NR
(
CURRENT
->
rq_dev
));
printk
(
"MTD device %
s doesn't appear to exist any more
\n
"
,
kdevname
(
DEVICE_NR
(
CURRENT
->
rq_dev
)
));
mtdblock_end_request
(
current_request
,
0
);
mtdblock_end_request
(
current_request
,
0
);
}
}
...
...
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