aboutsummaryrefslogtreecommitdiffstats
path: root/arch/cris
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
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')
-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
-rw-r--r--arch/cris/arch-v32/drivers/cryptocop.c2
-rw-r--r--arch/cris/arch-v32/drivers/gpio.c2
-rw-r--r--arch/cris/arch-v32/drivers/i2c.c2
-rw-r--r--arch/cris/arch-v32/drivers/pcf8563.c2
-rw-r--r--arch/cris/arch-v32/drivers/sync_serial.c2
-rw-r--r--arch/cris/kernel/profile.c2
11 files changed, 11 insertions, 11 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};
diff --git a/arch/cris/arch-v32/drivers/cryptocop.c b/arch/cris/arch-v32/drivers/cryptocop.c
index 2449637e6fc0..1a071f17446d 100644
--- a/arch/cris/arch-v32/drivers/cryptocop.c
+++ b/arch/cris/arch-v32/drivers/cryptocop.c
@@ -266,7 +266,7 @@ static void print_user_dma_lists(struct cryptocop_dma_list_operation *dma_op);
266 266
267 267
268 268
269struct file_operations cryptocop_fops = { 269const struct file_operations cryptocop_fops = {
270 owner: THIS_MODULE, 270 owner: THIS_MODULE,
271 open: cryptocop_open, 271 open: cryptocop_open,
272 release: cryptocop_release, 272 release: cryptocop_release,
diff --git a/arch/cris/arch-v32/drivers/gpio.c b/arch/cris/arch-v32/drivers/gpio.c
index 08d36f0955c6..d82c5c561135 100644
--- a/arch/cris/arch-v32/drivers/gpio.c
+++ b/arch/cris/arch-v32/drivers/gpio.c
@@ -705,7 +705,7 @@ gpio_leds_ioctl(unsigned int cmd, unsigned long arg)
705 return 0; 705 return 0;
706} 706}
707 707
708struct file_operations gpio_fops = { 708const struct file_operations gpio_fops = {
709 .owner = THIS_MODULE, 709 .owner = THIS_MODULE,
710 .poll = gpio_poll, 710 .poll = gpio_poll,
711 .ioctl = gpio_ioctl, 711 .ioctl = gpio_ioctl,
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c
index 95f00188c628..5d6c52737df3 100644
--- a/arch/cris/arch-v32/drivers/i2c.c
+++ b/arch/cris/arch-v32/drivers/i2c.c
@@ -573,7 +573,7 @@ i2c_ioctl(struct inode *inode, struct file *file,
573 return 0; 573 return 0;
574} 574}
575 575
576static struct file_operations i2c_fops = { 576static const struct file_operations i2c_fops = {
577 owner: THIS_MODULE, 577 owner: THIS_MODULE,
578 ioctl: i2c_ioctl, 578 ioctl: i2c_ioctl,
579 open: i2c_open, 579 open: i2c_open,
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c
index 2fc7d75a35de..544ab0179411 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);
50int pcf8563_open(struct inode *, struct file *); 50int pcf8563_open(struct inode *, struct file *);
51int pcf8563_release(struct inode *, struct file *); 51int pcf8563_release(struct inode *, struct file *);
52 52
53static struct file_operations pcf8563_fops = { 53static const struct file_operations pcf8563_fops = {
54 owner: THIS_MODULE, 54 owner: THIS_MODULE,
55 ioctl: pcf8563_ioctl, 55 ioctl: pcf8563_ioctl,
56 open: pcf8563_open, 56 open: pcf8563_open,
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c
index 424eb0eb1cd5..df89298aafc4 100644
--- a/arch/cris/arch-v32/drivers/sync_serial.c
+++ b/arch/cris/arch-v32/drivers/sync_serial.c
@@ -187,7 +187,7 @@ static struct sync_port ports[]=
187 187
188#define NUMBER_OF_PORTS (sizeof(ports)/sizeof(sync_port)) 188#define NUMBER_OF_PORTS (sizeof(ports)/sizeof(sync_port))
189 189
190static struct file_operations sync_serial_fops = { 190static const struct file_operations sync_serial_fops = {
191 .owner = THIS_MODULE, 191 .owner = THIS_MODULE,
192 .write = sync_serial_write, 192 .write = sync_serial_write,
193 .read = sync_serial_read, 193 .read = sync_serial_read,
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c
index f60ab785f235..4cfcae620507 100644
--- a/arch/cris/kernel/profile.c
+++ b/arch/cris/kernel/profile.c
@@ -50,7 +50,7 @@ write_cris_profile(struct file *file, const char __user *buf,
50 memset(sample_buffer, 0, SAMPLE_BUFFER_SIZE); 50 memset(sample_buffer, 0, SAMPLE_BUFFER_SIZE);
51} 51}
52 52
53static struct file_operations cris_proc_profile_operations = { 53static const struct file_operations cris_proc_profile_operations = {
54 .read = read_cris_profile, 54 .read = read_cris_profile,
55 .write = write_cris_profile, 55 .write = write_cris_profile,
56}; 56};