From 9c2e08c592cd357a8330c34def1e8ecfdcf53275 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 12 Feb 2007 00:55:37 -0800 Subject: [PATCH] mark struct file_operations const 9 Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/s390/char/tape_class.c | 2 +- drivers/s390/char/tape_class.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/char/tape_class.c b/drivers/s390/char/tape_class.c index 56b87618b100..2e0d29730b67 100644 --- a/drivers/s390/char/tape_class.c +++ b/drivers/s390/char/tape_class.c @@ -36,7 +36,7 @@ static struct class *tape_class; struct tape_class_device *register_tape_dev( struct device * device, dev_t dev, - struct file_operations *fops, + const struct file_operations *fops, char * device_name, char * mode_name) { diff --git a/drivers/s390/char/tape_class.h b/drivers/s390/char/tape_class.h index 3d0ca054cdee..a8bd9b47fad6 100644 --- a/drivers/s390/char/tape_class.h +++ b/drivers/s390/char/tape_class.h @@ -52,7 +52,7 @@ struct tape_class_device { struct tape_class_device *register_tape_dev( struct device * device, dev_t dev, - struct file_operations *fops, + const struct file_operations *fops, char * device_name, char * node_name ); -- cgit v1.2.3-59-g8ed1b