aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:32 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commit2b8693c0617e972fc0b2fd1ebf8de97e15b656c3 (patch)
tree3eb7dfbc8d5e4031e4992bdd566e211f5ada71f3 /drivers/char/watchdog
parent5dfe4c964a0dd7bb3a1d64a4166835a153146207 (diff)
[PATCH] mark struct file_operations const 3
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. 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/char/watchdog')
-rw-r--r--drivers/char/watchdog/iTCO_wdt.c2
-rw-r--r--drivers/char/watchdog/omap_wdt.c2
-rw-r--r--drivers/char/watchdog/pc87413_wdt.c2
-rw-r--r--drivers/char/watchdog/pnx4008_wdt.c2
-rw-r--r--drivers/char/watchdog/rm9k_wdt.c2
-rw-r--r--drivers/char/watchdog/smsc37b787_wdt.c2
-rw-r--r--drivers/char/watchdog/w83697hf_wdt.c2
7 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/watchdog/iTCO_wdt.c b/drivers/char/watchdog/iTCO_wdt.c
index 7eac922df867..fd8a44a08cd3 100644
--- a/drivers/char/watchdog/iTCO_wdt.c
+++ b/drivers/char/watchdog/iTCO_wdt.c
@@ -539,7 +539,7 @@ static int iTCO_wdt_ioctl (struct inode *inode, struct file *file,
539 * Kernel Interfaces 539 * Kernel Interfaces
540 */ 540 */
541 541
542static struct file_operations iTCO_wdt_fops = { 542static const struct file_operations iTCO_wdt_fops = {
543 .owner = THIS_MODULE, 543 .owner = THIS_MODULE,
544 .llseek = no_llseek, 544 .llseek = no_llseek,
545 .write = iTCO_wdt_write, 545 .write = iTCO_wdt_write,
diff --git a/drivers/char/watchdog/omap_wdt.c b/drivers/char/watchdog/omap_wdt.c
index 6c6f97332dbb..84074a697dce 100644
--- a/drivers/char/watchdog/omap_wdt.c
+++ b/drivers/char/watchdog/omap_wdt.c
@@ -230,7 +230,7 @@ omap_wdt_ioctl(struct inode *inode, struct file *file,
230 } 230 }
231} 231}
232 232
233static struct file_operations omap_wdt_fops = { 233static const struct file_operations omap_wdt_fops = {
234 .owner = THIS_MODULE, 234 .owner = THIS_MODULE,
235 .write = omap_wdt_write, 235 .write = omap_wdt_write,
236 .ioctl = omap_wdt_ioctl, 236 .ioctl = omap_wdt_ioctl,
diff --git a/drivers/char/watchdog/pc87413_wdt.c b/drivers/char/watchdog/pc87413_wdt.c
index 1d447e32af41..a77a90717ad2 100644
--- a/drivers/char/watchdog/pc87413_wdt.c
+++ b/drivers/char/watchdog/pc87413_wdt.c
@@ -526,7 +526,7 @@ static int pc87413_notify_sys(struct notifier_block *this,
526 526
527/* -- Module's structures ---------------------------------------*/ 527/* -- Module's structures ---------------------------------------*/
528 528
529static struct file_operations pc87413_fops = { 529static const struct file_operations pc87413_fops = {
530 .owner = THIS_MODULE, 530 .owner = THIS_MODULE,
531 .llseek = no_llseek, 531 .llseek = no_llseek,
532 .write = pc87413_write, 532 .write = pc87413_write,
diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c
index 3a55fc6abcd8..ff6f1ca1e5e7 100644
--- a/drivers/char/watchdog/pnx4008_wdt.c
+++ b/drivers/char/watchdog/pnx4008_wdt.c
@@ -238,7 +238,7 @@ static int pnx4008_wdt_release(struct inode *inode, struct file *file)
238 return 0; 238 return 0;
239} 239}
240 240
241static struct file_operations pnx4008_wdt_fops = { 241static const struct file_operations pnx4008_wdt_fops = {
242 .owner = THIS_MODULE, 242 .owner = THIS_MODULE,
243 .llseek = no_llseek, 243 .llseek = no_llseek,
244 .write = pnx4008_wdt_write, 244 .write = pnx4008_wdt_write,
diff --git a/drivers/char/watchdog/rm9k_wdt.c b/drivers/char/watchdog/rm9k_wdt.c
index 7576a13e86bc..b4678839d3bb 100644
--- a/drivers/char/watchdog/rm9k_wdt.c
+++ b/drivers/char/watchdog/rm9k_wdt.c
@@ -95,7 +95,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be disabled once started");
95 95
96 96
97/* Kernel interfaces */ 97/* Kernel interfaces */
98static struct file_operations fops = { 98static const struct file_operations fops = {
99 .owner = THIS_MODULE, 99 .owner = THIS_MODULE,
100 .open = wdt_gpi_open, 100 .open = wdt_gpi_open,
101 .release = wdt_gpi_release, 101 .release = wdt_gpi_release,
diff --git a/drivers/char/watchdog/smsc37b787_wdt.c b/drivers/char/watchdog/smsc37b787_wdt.c
index 9f56913b484f..a9681d580dd3 100644
--- a/drivers/char/watchdog/smsc37b787_wdt.c
+++ b/drivers/char/watchdog/smsc37b787_wdt.c
@@ -510,7 +510,7 @@ static int wb_smsc_wdt_notify_sys(struct notifier_block *this, unsigned long cod
510 510
511/* -- Module's structures ---------------------------------------*/ 511/* -- Module's structures ---------------------------------------*/
512 512
513static struct file_operations wb_smsc_wdt_fops = 513static const struct file_operations wb_smsc_wdt_fops =
514{ 514{
515 .owner = THIS_MODULE, 515 .owner = THIS_MODULE,
516 .llseek = no_llseek, 516 .llseek = no_llseek,
diff --git a/drivers/char/watchdog/w83697hf_wdt.c b/drivers/char/watchdog/w83697hf_wdt.c
index 7768b55487c8..c960ec110dd7 100644
--- a/drivers/char/watchdog/w83697hf_wdt.c
+++ b/drivers/char/watchdog/w83697hf_wdt.c
@@ -323,7 +323,7 @@ wdt_notify_sys(struct notifier_block *this, unsigned long code,
323 * Kernel Interfaces 323 * Kernel Interfaces
324 */ 324 */
325 325
326static struct file_operations wdt_fops = { 326static const struct file_operations wdt_fops = {
327 .owner = THIS_MODULE, 327 .owner = THIS_MODULE,
328 .llseek = no_llseek, 328 .llseek = no_llseek,
329 .write = wdt_write, 329 .write = wdt_write,