aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-03-28 04:56:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-28 12:16:05 -0500
commit99ac48f54a91d02140c497edc31dc57d4bc5c85d (patch)
tree68719391694a6914191bdf73d2071875f7653f6f /drivers/usb/core
parentec1b9466cb4f6ae6d950bd67055d9410d1056d2a (diff)
[PATCH] mark f_ops const in the inode
Mark the f_ops members of inodes as const, as well as fix the ripple-through this causes by places that copy this f_ops and then "do stuff" with it. Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index 37b13368c81..b263a54a13c 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -24,15 +24,15 @@
24#include "usb.h" 24#include "usb.h"
25 25
26#define MAX_USB_MINORS 256 26#define MAX_USB_MINORS 256
27static struct file_operations *usb_minors[MAX_USB_MINORS]; 27static const struct file_operations *usb_minors[MAX_USB_MINORS];
28static DEFINE_SPINLOCK(minor_lock); 28static DEFINE_SPINLOCK(minor_lock);
29 29
30static int usb_open(struct inode * inode, struct file * file) 30static int usb_open(struct inode * inode, struct file * file)
31{ 31{
32 int minor = iminor(inode); 32 int minor = iminor(inode);
33 struct file_operations *c; 33 const struct file_operations *c;
34 int err = -ENODEV; 34 int err = -ENODEV;
35 struct file_operations *old_fops, *new_fops = NULL; 35 const struct file_operations *old_fops, *new_fops = NULL;
36 36
37 spin_lock (&minor_lock); 37 spin_lock (&minor_lock);
38 c = usb_minors[minor]; 38 c = usb_minors[minor];