From 5dfe4c964a0dd7bb3a1d64a4166835a153146207 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Mon, 12 Feb 2007 00:55:31 -0800 Subject: [PATCH] mark struct file_operations const 2 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. [akpm@osdl.org: sparc64 fix] Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/cris/arch-v32/drivers/pcf8563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/cris/arch-v32/drivers/pcf8563.c') diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c index 2fc7d75a35d..544ab017941 100644 --- a/arch/cris/arch-v32/drivers/pcf8563.c +++ b/arch/cris/arch-v32/drivers/pcf8563.c @@ -50,7 +50,7 @@ int pcf8563_ioctl(struct inode *, struct file *, unsigned int, unsigned long); int pcf8563_open(struct inode *, struct file *); int pcf8563_release(struct inode *, struct file *); -static struct file_operations pcf8563_fops = { +static const struct file_operations pcf8563_fops = { owner: THIS_MODULE, ioctl: pcf8563_ioctl, open: pcf8563_open, -- cgit v1.2.3