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
6244f13c
Commit
6244f13c
authored
Aug 07, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix up a couple of drivers - notable sg - for nonseekability.
parent
2f90403a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
10 deletions
+3
-10
drivers/char/ds1620.c
drivers/char/ds1620.c
+1
-4
drivers/char/dtlk.c
drivers/char/dtlk.c
+1
-4
drivers/scsi/sg.c
drivers/scsi/sg.c
+1
-2
No files found.
drivers/char/ds1620.c
View file @
6244f13c
...
...
@@ -218,10 +218,6 @@ ds1620_read(struct file *file, char *buf, size_t count, loff_t *ptr)
signed
int
cur_temp
;
signed
char
cur_temp_degF
;
/* Can't seek (pread) on this device */
if
(
ptr
!=
&
file
->
f_pos
)
return
-
ESPIPE
;
cur_temp
=
cvt_9_to_int
(
ds1620_in
(
THERM_READ_TEMP
,
9
))
>>
1
;
/* convert to Fahrenheit, as per wdt.c */
...
...
@@ -338,6 +334,7 @@ static struct proc_dir_entry *proc_therm_ds1620;
static
struct
file_operations
ds1620_fops
=
{
.
owner
=
THIS_MODULE
,
.
open
=
nonseekable_open
,
.
read
=
ds1620_read
,
.
ioctl
=
ds1620_ioctl
,
};
...
...
drivers/char/dtlk.c
View file @
6244f13c
...
...
@@ -128,10 +128,6 @@ static ssize_t dtlk_read(struct file *file, char __user *buf,
char
ch
;
int
i
=
0
,
retries
;
/* Can't seek (pread) on the DoubleTalk. */
if
(
ppos
!=
&
file
->
f_pos
)
return
-
ESPIPE
;
TRACE_TEXT
(
"(dtlk_read"
);
/* printk("DoubleTalk PC - dtlk_read()\n"); */
...
...
@@ -303,6 +299,7 @@ static int dtlk_open(struct inode *inode, struct file *file)
{
TRACE_TEXT
(
"(dtlk_open"
);
nonseekable_open
(
inode
,
file
);
switch
(
iminor
(
inode
))
{
case
DTLK_MINOR
:
if
(
dtlk_busy
)
...
...
drivers/scsi/sg.c
View file @
6244f13c
...
...
@@ -234,6 +234,7 @@ sg_open(struct inode *inode, struct file *filp)
int
res
;
int
retval
;
nonseekable_open
(
inode
,
filp
);
SCSI_LOG_TIMEOUT
(
3
,
printk
(
"sg_open: dev=%d, flags=0x%x
\n
"
,
dev
,
flags
));
sdp
=
sg_get_dev
(
dev
);
if
((
!
sdp
)
||
(
!
sdp
->
device
))
...
...
@@ -343,7 +344,6 @@ sg_read(struct file *filp, char __user *buf, size_t count, loff_t * ppos)
return
-
ENXIO
;
SCSI_LOG_TIMEOUT
(
3
,
printk
(
"sg_read: %s, count=%d
\n
"
,
sdp
->
disk
->
disk_name
,
(
int
)
count
));
if
(
ppos
!=
&
filp
->
f_pos
)
;
/* FIXME: Hmm. Seek to the right place, or fail? */
if
((
k
=
verify_area
(
VERIFY_WRITE
,
buf
,
count
)))
return
k
;
if
(
sfp
->
force_packid
&&
(
count
>=
SZ_SG_HEADER
))
{
...
...
@@ -501,7 +501,6 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)
if
(
!
((
filp
->
f_flags
&
O_NONBLOCK
)
||
scsi_block_when_processing_errors
(
sdp
->
device
)))
return
-
ENXIO
;
if
(
ppos
!=
&
filp
->
f_pos
)
;
/* FIXME: Hmm. Seek to the right place, or fail? */
if
((
k
=
verify_area
(
VERIFY_READ
,
buf
,
count
)))
return
k
;
/* protects following copy_from_user()s + get_user()s */
...
...
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