aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:33 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commitfa027c2a0a0d6d1df6b29ee99048502c93da0dd4 (patch)
tree64a6b20c6c6e19a731882f830bd70ca5c8d99943 /drivers/macintosh
parent2b8693c0617e972fc0b2fd1ebf8de97e15b656c3 (diff)
[PATCH] mark struct file_operations const 4
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@sdl.org: dvb 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 'drivers/macintosh')
-rw-r--r--drivers/macintosh/adb.c2
-rw-r--r--drivers/macintosh/ans-lcd.c2
-rw-r--r--drivers/macintosh/apm_emu.c2
-rw-r--r--drivers/macintosh/nvram.c2
-rw-r--r--drivers/macintosh/smu.c2
-rw-r--r--drivers/macintosh/via-pmu.c2
-rw-r--r--drivers/macintosh/via-pmu68k.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 7cec6de5e2b0..f729eebf771f 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -885,7 +885,7 @@ out:
885 return ret; 885 return ret;
886} 886}
887 887
888static struct file_operations adb_fops = { 888static const struct file_operations adb_fops = {
889 .owner = THIS_MODULE, 889 .owner = THIS_MODULE,
890 .llseek = no_llseek, 890 .llseek = no_llseek,
891 .read = adb_read, 891 .read = adb_read,
diff --git a/drivers/macintosh/ans-lcd.c b/drivers/macintosh/ans-lcd.c
index 2b8a6e821d44..cdd5a0f72e3c 100644
--- a/drivers/macintosh/ans-lcd.c
+++ b/drivers/macintosh/ans-lcd.c
@@ -121,7 +121,7 @@ anslcd_open( struct inode * inode, struct file * file )
121 return 0; 121 return 0;
122} 122}
123 123
124struct file_operations anslcd_fops = { 124const struct file_operations anslcd_fops = {
125 .write = anslcd_write, 125 .write = anslcd_write,
126 .ioctl = anslcd_ioctl, 126 .ioctl = anslcd_ioctl,
127 .open = anslcd_open, 127 .open = anslcd_open,
diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c
index 4300c628f8af..a6d50f4fabd7 100644
--- a/drivers/macintosh/apm_emu.c
+++ b/drivers/macintosh/apm_emu.c
@@ -501,7 +501,7 @@ static int apm_emu_get_info(char *buf, char **start, off_t fpos, int length)
501 return p - buf; 501 return p - buf;
502} 502}
503 503
504static struct file_operations apm_bios_fops = { 504static const struct file_operations apm_bios_fops = {
505 .owner = THIS_MODULE, 505 .owner = THIS_MODULE,
506 .read = do_read, 506 .read = do_read,
507 .poll = do_poll, 507 .poll = do_poll,
diff --git a/drivers/macintosh/nvram.c b/drivers/macintosh/nvram.c
index 30791875fc97..b195d753d2ed 100644
--- a/drivers/macintosh/nvram.c
+++ b/drivers/macintosh/nvram.c
@@ -100,7 +100,7 @@ static int nvram_ioctl(struct inode *inode, struct file *file,
100 return 0; 100 return 0;
101} 101}
102 102
103struct file_operations nvram_fops = { 103const struct file_operations nvram_fops = {
104 .owner = THIS_MODULE, 104 .owner = THIS_MODULE,
105 .llseek = nvram_llseek, 105 .llseek = nvram_llseek,
106 .read = read_nvram, 106 .read = read_nvram,
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 6f30459b9385..3096836d8bd3 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -1277,7 +1277,7 @@ static int smu_release(struct inode *inode, struct file *file)
1277} 1277}
1278 1278
1279 1279
1280static struct file_operations smu_device_fops = { 1280static const struct file_operations smu_device_fops = {
1281 .llseek = no_llseek, 1281 .llseek = no_llseek,
1282 .read = smu_read, 1282 .read = smu_read,
1283 .write = smu_write, 1283 .write = smu_write,
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index eb6653f69ce4..96bea4b62c43 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -2672,7 +2672,7 @@ pmu_ioctl(struct inode * inode, struct file *filp,
2672 return error; 2672 return error;
2673} 2673}
2674 2674
2675static struct file_operations pmu_device_fops = { 2675static const struct file_operations pmu_device_fops = {
2676 .read = pmu_read, 2676 .read = pmu_read,
2677 .write = pmu_write, 2677 .write = pmu_write,
2678 .poll = pmu_fpoll, 2678 .poll = pmu_fpoll,
diff --git a/drivers/macintosh/via-pmu68k.c b/drivers/macintosh/via-pmu68k.c
index 93e6ef9233f9..4f5b6fa196c5 100644
--- a/drivers/macintosh/via-pmu68k.c
+++ b/drivers/macintosh/via-pmu68k.c
@@ -1040,7 +1040,7 @@ static int pmu_ioctl(struct inode * inode, struct file *filp,
1040 return -EINVAL; 1040 return -EINVAL;
1041} 1041}
1042 1042
1043static struct file_operations pmu_device_fops = { 1043static const struct file_operations pmu_device_fops = {
1044 .read = pmu_read, 1044 .read = pmu_read,
1045 .write = pmu_write, 1045 .write = pmu_write,
1046 .ioctl = pmu_ioctl, 1046 .ioctl = pmu_ioctl,