bsg: mark struct file_operations const
authorArjan van de Ven <arjan@linux.intel.com>
Mon, 15 Oct 2007 09:01:53 +0000 (11:01 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 16 Oct 2007 07:59:54 +0000 (09:59 +0200)
struct file_operations is generally const (to avoid false sharing and get compile time errors on accidental writing to this shared structure); bsg recently added one of these without the const keyword. Patch below marks it const....

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
block/bsg.c

index b8ddfc66f210aac023479291a95ea1627f396950..8e181ab3afb9a515f38195b450145002a2be044d 100644 (file)
@@ -908,7 +908,7 @@ static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
        }
 }
 
-static struct file_operations bsg_fops = {
+static const struct file_operations bsg_fops = {
        .read           =       bsg_read,
        .write          =       bsg_write,
        .poll           =       bsg_poll,