block : make partitions_op & diskstats_op const
Subsystems (2)
PATCH 1/1 block : make partitions_op & diskstats_op const
Hi all,
Make partitions_op & diskstats_op const
Signed-off-by Philippe De Muyter <[email protected]>
block/genhd.c +2 -2
@@ -328,7 +328,7 @@ static int show_partition(struct seq_filreturn 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_filreturn 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
@@ -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);