aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r--drivers/scsi/sg.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 441a1c5b8974..02d99982a74d 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2325,16 +2325,15 @@ static struct sg_proc_leaf sg_proc_leaf_arr[] = {
2325static int 2325static int
2326sg_proc_init(void) 2326sg_proc_init(void)
2327{ 2327{
2328 int k, mask;
2329 int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr); 2328 int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr);
2330 struct sg_proc_leaf * leaf; 2329 int k;
2331 2330
2332 sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL); 2331 sg_proc_sgp = proc_mkdir(sg_proc_sg_dirname, NULL);
2333 if (!sg_proc_sgp) 2332 if (!sg_proc_sgp)
2334 return 1; 2333 return 1;
2335 for (k = 0; k < num_leaves; ++k) { 2334 for (k = 0; k < num_leaves; ++k) {
2336 leaf = &sg_proc_leaf_arr[k]; 2335 struct sg_proc_leaf *leaf = &sg_proc_leaf_arr[k];
2337 mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO; 2336 umode_t mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO;
2338 proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops); 2337 proc_create(leaf->name, mask, sg_proc_sgp, leaf->fops);
2339 } 2338 }
2340 return 0; 2339 return 0;