[SCSI] sg: constify sg_proc_leaf_arr

Signed-off-by: Joern Engel <joern@logfs.org>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
Jörn Engel 2012-04-12 17:35:25 -04:00 committed by James Bottomley
parent 37b9d1e001
commit 18b8ba6cfb

View file

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