A while ago I made a semantic patch to introduce const on file_operations
and and input_device_id types. I tested it on 142 files in which the
change had already been made and got the same result in each case. I have
run it on linux-next and obtained the attached result. However, I have
not checked any of these results, so this is not meant as a submitted
patch, but as a starting point for someone who wants to look further into
the problem.
julia
diff -u -p a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c
--- a/fs/ubifs/xattr.c 2009-06-27 09:35:06.000000000 +0200
+++ b/fs/ubifs/xattr.c 2009-08-11 22:42:24.000000000 +0200
@@ -80,7 +80,7 @@ enum {
static struct inode_operations none_inode_operations;
static struct address_space_operations none_address_operations;
-static struct file_operations none_file_operations;
+static const struct file_operations none_file_operations;