summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r--drivers/scsi/sg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index b098942445ec..98b9312ba8da 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -2635,8 +2635,7 @@ static int
sg_proc_init(void)
{
int k, mask;
- int num_leaves =
- sizeof (sg_proc_leaf_arr) / sizeof (sg_proc_leaf_arr[0]);
+ int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr);
struct proc_dir_entry *pdep;
struct sg_proc_leaf * leaf;
@@ -2661,8 +2660,7 @@ static void
sg_proc_cleanup(void)
{
int k;
- int num_leaves =
- sizeof (sg_proc_leaf_arr) / sizeof (sg_proc_leaf_arr[0]);
+ int num_leaves = ARRAY_SIZE(sg_proc_leaf_arr);
if (!sg_proc_sgp)
return;