summaryrefslogtreecommitdiff
path: root/drivers/staging/ft1000
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-09-30 10:24:07 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-05 08:50:14 -0700
commitd16044cf8ce0ff6384cd80eb0abaa2ba57b19a5e (patch)
treeac95dc8df12c484d2ff36afccb3e9bd654c05e11 /drivers/staging/ft1000
parentcff55f50b882b197a52c4cf0108a43c615d1fdba (diff)
staging: make new character devices nonseekable
As a preparation for changing the default behaviour of llseek to no_llseek, every file_operations structure should have a .llseek operation. There are three new instances in staging now, which can all be changed into no_llseek explicitly since the devices do not need to seek. Add nonseekable_open where appropriate, to prevent pread/pwrite as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/ft1000')
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
index 65087cea3028..89d9a5848791 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c
@@ -81,10 +81,11 @@ int numofmsgbuf = 0;
//
static struct file_operations ft1000fops =
{
- unlocked_ioctl: ft1000_ChIoctl,
- poll: ft1000_ChPoll,
- open: ft1000_ChOpen,
- release: ft1000_ChRelease
+ .unlocked_ioctl = ft1000_ChIoctl,
+ .poll = ft1000_ChPoll,
+ .open = ft1000_ChOpen,
+ .release = ft1000_ChRelease,
+ .llseek = no_llseek,
};
@@ -470,6 +471,7 @@ static int ft1000_ChOpen (struct inode *Inode, struct file *File)
File->private_data = pdevobj[num]->net;
+ nonseekable_open(Inode, File);
return 0;
}