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
1a37f5ec
Commit
1a37f5ec
authored
Aug 19, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
carma-fpga: switch to fixed_size_llseek()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
2ec3a12a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
20 deletions
+1
-20
drivers/misc/carma/carma-fpga-program.c
drivers/misc/carma/carma-fpga-program.c
+1
-20
No files found.
drivers/misc/carma/carma-fpga-program.c
View file @
1a37f5ec
...
...
@@ -767,26 +767,7 @@ static loff_t fpga_llseek(struct file *filp, loff_t offset, int origin)
if
((
filp
->
f_flags
&
O_ACCMODE
)
!=
O_RDONLY
)
return
-
EINVAL
;
switch
(
origin
)
{
case
SEEK_SET
:
/* seek relative to the beginning of the file */
newpos
=
offset
;
break
;
case
SEEK_CUR
:
/* seek relative to current position in the file */
newpos
=
filp
->
f_pos
+
offset
;
break
;
case
SEEK_END
:
/* seek relative to the end of the file */
newpos
=
priv
->
fw_size
-
offset
;
break
;
default:
return
-
EINVAL
;
}
/* check for sanity */
if
(
newpos
>
priv
->
fw_size
)
return
-
EINVAL
;
filp
->
f_pos
=
newpos
;
return
newpos
;
return
fixed_size_llseek
(
file
,
offset
,
origin
,
priv
->
fw_size
);
}
static
const
struct
file_operations
fpga_fops
=
{
...
...
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