aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm
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/bcm
parentcff55f50b882b197a52c4cf0108a43c615d1fdba (diff)
downloadkernel_samsung_smdk4412-d16044cf8ce0ff6384cd80eb0abaa2ba57b19a5e.zip
kernel_samsung_smdk4412-d16044cf8ce0ff6384cd80eb0abaa2ba57b19a5e.tar.gz
kernel_samsung_smdk4412-d16044cf8ce0ff6384cd80eb0abaa2ba57b19a5e.tar.bz2
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/bcm')
-rw-r--r--drivers/staging/bcm/Bcmchar.c5
-rw-r--r--drivers/staging/bcm/InterfaceInit.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c
index b239862..afde77a 100644
--- a/drivers/staging/bcm/Bcmchar.c
+++ b/drivers/staging/bcm/Bcmchar.c
@@ -1,3 +1,5 @@
+#include <linux/fs.h>
+
#include "headers.h"
/***************************************************************
* Function - bcm_char_open()
@@ -35,6 +37,8 @@ static int bcm_char_open(struct inode *inode, struct file * filp)
/*Start Queuing the control response Packets*/
atomic_inc(&Adapter->ApplicationRunning);
+
+ nonseekable_open(inode, filp);
return 0;
}
static int bcm_char_release(struct inode *inode, struct file *filp)
@@ -2360,6 +2364,7 @@ static struct file_operations bcm_fops = {
.release = bcm_char_release,
.read = bcm_char_read,
.unlocked_ioctl = bcm_char_ioctl,
+ .llseek = no_llseek,
};
diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c
index d22a0e5..67d8572 100644
--- a/drivers/staging/bcm/InterfaceInit.c
+++ b/drivers/staging/bcm/InterfaceInit.c
@@ -163,6 +163,7 @@ static struct file_operations usbbcm_fops = {
.read = usbbcm_read,
.write = usbbcm_write,
.owner = THIS_MODULE,
+ .llseek = no_llseek,
};
static struct usb_class_driver usbbcm_class = {