aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/proc.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-02-12 03:55:34 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 12:48:45 -0500
commitd54b1fdb1d9f82e375a299e22bd366aad52d4c34 (patch)
treef94768d59702dbbc0beb9a70d9be65dbc5e5108d /drivers/pci/proc.c
parentfa027c2a0a0d6d1df6b29ee99048502c93da0dd4 (diff)
[PATCH] mark struct file_operations const 5
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/pci/proc.c')
-rw-r--r--drivers/pci/proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 4a6760a3b31f..ed87aa59f0b1 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -287,7 +287,7 @@ static int proc_bus_pci_release(struct inode *inode, struct file *file)
287} 287}
288#endif /* HAVE_PCI_MMAP */ 288#endif /* HAVE_PCI_MMAP */
289 289
290static struct file_operations proc_bus_pci_operations = { 290static const struct file_operations proc_bus_pci_operations = {
291 .llseek = proc_bus_pci_lseek, 291 .llseek = proc_bus_pci_lseek,
292 .read = proc_bus_pci_read, 292 .read = proc_bus_pci_read,
293 .write = proc_bus_pci_write, 293 .write = proc_bus_pci_write,
@@ -456,7 +456,7 @@ static int proc_bus_pci_dev_open(struct inode *inode, struct file *file)
456{ 456{
457 return seq_open(file, &proc_bus_pci_devices_op); 457 return seq_open(file, &proc_bus_pci_devices_op);
458} 458}
459static struct file_operations proc_bus_pci_dev_operations = { 459static const struct file_operations proc_bus_pci_dev_operations = {
460 .open = proc_bus_pci_dev_open, 460 .open = proc_bus_pci_dev_open,
461 .read = seq_read, 461 .read = seq_read,
462 .llseek = seq_lseek, 462 .llseek = seq_lseek,