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
nexedi
linux
Commits
b959957f
Commit
b959957f
authored
Jun 16, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtdchar: switch to fixed_size_llseek()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
1bf9d14d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
19 deletions
+1
-19
drivers/mtd/mtdchar.c
drivers/mtd/mtdchar.c
+1
-19
No files found.
drivers/mtd/mtdchar.c
View file @
b959957f
...
@@ -55,25 +55,7 @@ struct mtd_file_info {
...
@@ -55,25 +55,7 @@ struct mtd_file_info {
static
loff_t
mtdchar_lseek
(
struct
file
*
file
,
loff_t
offset
,
int
orig
)
static
loff_t
mtdchar_lseek
(
struct
file
*
file
,
loff_t
offset
,
int
orig
)
{
{
struct
mtd_file_info
*
mfi
=
file
->
private_data
;
struct
mtd_file_info
*
mfi
=
file
->
private_data
;
struct
mtd_info
*
mtd
=
mfi
->
mtd
;
return
fixed_size_llseek
(
file
,
offset
,
orig
,
mfi
->
mtd
->
size
);
switch
(
orig
)
{
case
SEEK_SET
:
break
;
case
SEEK_CUR
:
offset
+=
file
->
f_pos
;
break
;
case
SEEK_END
:
offset
+=
mtd
->
size
;
break
;
default:
return
-
EINVAL
;
}
if
(
offset
>=
0
&&
offset
<=
mtd
->
size
)
return
file
->
f_pos
=
offset
;
return
-
EINVAL
;
}
}
static
int
count
;
static
int
count
;
...
...
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