Skip to content

Commit

Permalink
raw: use explicit llseek file operations
Browse files Browse the repository at this point in the history
The raw_fops may need to seek, so there should
be an explicit reference to default_llseek.
raw_ctl_fops does not contain a read or write
method, so we use noop_llseek to ignore seeking
requests without an error.

Signed-off-by: Arnd Bergmann <[email protected]>
  • Loading branch information
arndb committed Sep 16, 2010
1 parent 275bd41 commit cb3b9cf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/char/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,13 +258,15 @@ static const struct file_operations raw_fops = {
.open = raw_open,
.release = raw_release,
.unlocked_ioctl = raw_ioctl,
.llseek = default_llseek,
.owner = THIS_MODULE,
};

static const struct file_operations raw_ctl_fops = {
.unlocked_ioctl = raw_ctl_ioctl,
.open = raw_open,
.owner = THIS_MODULE,
.llseek = noop_llseek,
};

static struct cdev raw_cdev;
Expand Down

0 comments on commit cb3b9cf

Please sign in to comment.