Skip to content

Commit

Permalink
[SCSI] sg: constify sg_proc_leaf_arr
Browse files Browse the repository at this point in the history
Signed-off-by: Joern Engel <joern@logfs.org>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Jörn Engel authored and James Bottomley committed May 17, 2012
1 parent 37b9d1e commit 18b8ba6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -2327,7 +2327,7 @@ struct sg_proc_leaf {
const struct file_operations * fops;
};

static struct sg_proc_leaf sg_proc_leaf_arr[] = {
static const struct sg_proc_leaf sg_proc_leaf_arr[] = {
{"allow_dio", &adio_fops},
{"debug", &debug_fops},
{"def_reserved_size", &dressz_fops},
Expand All @@ -2347,7 +2347,7 @@ sg_proc_init(void)
if (!sg_proc_sgp)
return 1;
for (k = 0; k < num_leaves; ++k) {
struct sg_proc_leaf *leaf = &sg_proc_leaf_arr[k];
const struct sg_proc_leaf *leaf = &sg_proc_leaf_arr[k];
umode_t mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO;
proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops);
}
Expand Down

0 comments on commit 18b8ba6

Please sign in to comment.