Skip to contentSkip to conversation

block : make partitions_op & diskstats_op const

PATCH New Philippe De Muyter 1 participant 1 message Jul 6, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block : make partitions_op & diskstats_op const

Hi all,

Make partitions_op & diskstats_op const

block/genhd.c +2 -2
diff -r 6c0a10cc415a block/genhd.c
@@ -328,7 +328,7 @@ static int show_partition(struct seq_fil
 	return 0;
 }
 
-struct seq_operations partitions_op = {
+const struct seq_operations partitions_op = {
 	.start =part_start,
 	.next =	part_next,
 	.stop =	part_stop,
@@ -689,7 +689,7 @@ static int diskstats_show(struct seq_fil
 	return 0;
 }
 
-struct seq_operations diskstats_op = {
+const struct seq_operations diskstats_op = {
 	.start	= diskstats_start,
 	.next	= diskstats_next,
 	.stop	= diskstats_stop,
fs/proc/proc_misc.c +2 -2
diff -r 6c0a10cc415a fs/proc/proc_misc.c
@@ -357,7 +357,7 @@ static int stram_read_proc(char *page, c
 #endif
 
 #ifdef CONFIG_BLOCK
-extern struct seq_operations partitions_op;
+extern const struct seq_operations partitions_op;
 static int partitions_open(struct inode *inode, struct file *file)
 {
 	return seq_open(file, &partitions_op);
@@ -369,7 +369,7 @@ static const struct file_operations proc
 	.release	= seq_release,
 };
 
-extern struct seq_operations diskstats_op;
+extern const struct seq_operations diskstats_op;
 static int diskstats_open(struct inode *inode, struct file *file)
 {
 	return seq_open(file, &diskstats_op);