aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Engel <joern@logfs.org>2012-04-12 17:35:25 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-05-17 05:08:57 -0400
commit18b8ba6cfb49b201e37489ca9761730c22be80af (patch)
treeee150f9fe6cec142318beb1f5d91e9cff3bade52
parent37b9d1e0017b2d8384ad03d250b15fd3d69771d5 (diff)
[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>
-rw-r--r--drivers/scsi/sg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 470d3a0b6098..9c5c5f2b3962 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2327,7 +2327,7 @@ struct sg_proc_leaf {
2327 const struct file_operations * fops; 2327 const struct file_operations * fops;
2328}; 2328};
2329 2329
2330static struct sg_proc_leaf sg_proc_leaf_arr[] = { 2330static const struct sg_proc_leaf sg_proc_leaf_arr[] = {
2331 {"allow_dio", &adio_fops}, 2331 {"allow_dio", &adio_fops},
2332 {"debug", &debug_fops}, 2332 {"debug", &debug_fops},
2333 {"def_reserved_size", &dressz_fops}, 2333 {"def_reserved_size", &dressz_fops},
@@ -2347,7 +2347,7 @@ sg_proc_init(void)
2347 if (!sg_proc_sgp) 2347 if (!sg_proc_sgp)
2348 return 1; 2348 return 1;
2349 for (k = 0; k < num_leaves; ++k) { 2349 for (k = 0; k < num_leaves; ++k) {
2350 struct sg_proc_leaf *leaf = &sg_proc_leaf_arr[k]; 2350 const struct sg_proc_leaf *leaf = &sg_proc_leaf_arr[k];
2351 umode_t mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO; 2351 umode_t mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO;
2352 proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops); 2352 proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops);
2353 } 2353 }