aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris/arch-v10/drivers
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:31 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:44 -0500
commit5dfe4c964a0dd7bb3a1d64a4166835a153146207 (patch)
tree2fb2fd8c09922be4f40a5a9ac50b537b1d780e27 /arch/cris/arch-v10/drivers
parent540473208f8ac71c25a87e1a2670c3c18dd4d6db (diff)
[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 <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/cris/arch-v10/drivers')
-rw-r--r--arch/cris/arch-v10/drivers/ds1302.c2
-rw-r--r--arch/cris/arch-v10/drivers/eeprom.c2
-rw-r--r--arch/cris/arch-v10/drivers/gpio.c2
-rw-r--r--arch/cris/arch-v10/drivers/i2c.c2
-rw-r--r--arch/cris/arch-v10/drivers/pcf8563.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c
index 3cf4f23de1d0..88eff7f54ea6 100644
--- a/arch/cris/arch-v10/drivers/ds1302.c
+++ b/arch/cris/arch-v10/drivers/ds1302.c
@@ -499,7 +499,7 @@ print_rtc_status(void)
499 499
500/* The various file operations we support. */ 500/* The various file operations we support. */
501 501
502static struct file_operations rtc_fops = { 502static const struct file_operations rtc_fops = {
503 .owner = THIS_MODULE, 503 .owner = THIS_MODULE,
504 .ioctl = rtc_ioctl, 504 .ioctl = rtc_ioctl,
505}; 505};
diff --git a/arch/cris/arch-v10/drivers/eeprom.c b/arch/cris/arch-v10/drivers/eeprom.c
index 284ebfda03f0..be35a70798aa 100644
--- a/arch/cris/arch-v10/drivers/eeprom.c
+++ b/arch/cris/arch-v10/drivers/eeprom.c
@@ -172,7 +172,7 @@ static const char eeprom_name[] = "eeprom";
172static struct eeprom_type eeprom; 172static struct eeprom_type eeprom;
173 173
174/* This is the exported file-operations structure for this device. */ 174/* This is the exported file-operations structure for this device. */
175struct file_operations eeprom_fops = 175const struct file_operations eeprom_fops =
176{ 176{
177 .llseek = eeprom_lseek, 177 .llseek = eeprom_lseek,
178 .read = eeprom_read, 178 .read = eeprom_read,
diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c
index 9aba18b931dd..f389ed6998fe 100644
--- a/arch/cris/arch-v10/drivers/gpio.c
+++ b/arch/cris/arch-v10/drivers/gpio.c
@@ -838,7 +838,7 @@ gpio_leds_ioctl(unsigned int cmd, unsigned long arg)
838 return 0; 838 return 0;
839} 839}
840 840
841struct file_operations gpio_fops = { 841const struct file_operations gpio_fops = {
842 .owner = THIS_MODULE, 842 .owner = THIS_MODULE,
843 .poll = gpio_poll, 843 .poll = gpio_poll,
844 .ioctl = gpio_ioctl, 844 .ioctl = gpio_ioctl,
diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c
index 092c724a645f..aca81ddaf60f 100644
--- a/arch/cris/arch-v10/drivers/i2c.c
+++ b/arch/cris/arch-v10/drivers/i2c.c
@@ -692,7 +692,7 @@ i2c_ioctl(struct inode *inode, struct file *file,
692 return 0; 692 return 0;
693} 693}
694 694
695static struct file_operations i2c_fops = { 695static const struct file_operations i2c_fops = {
696 .owner = THIS_MODULE, 696 .owner = THIS_MODULE,
697 .ioctl = i2c_ioctl, 697 .ioctl = i2c_ioctl,
698 .open = i2c_open, 698 .open = i2c_open,
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c
index 8c830eefc89c..107796e50149 100644
--- a/arch/cris/arch-v10/drivers/pcf8563.c
+++ b/arch/cris/arch-v10/drivers/pcf8563.c
@@ -56,7 +56,7 @@ static const unsigned char days_in_month[] =
56 56
57int pcf8563_ioctl(struct inode *, struct file *, unsigned int, unsigned long); 57int pcf8563_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
58 58
59static struct file_operations pcf8563_fops = { 59static const struct file_operations pcf8563_fops = {
60 .owner = THIS_MODULE, 60 .owner = THIS_MODULE,
61 .ioctl = pcf8563_ioctl, 61 .ioctl = pcf8563_ioctl,
62}; 62};