drivers/ide/legacy/hd.c: Array size calculation using sizeof replaced with ARRAY_SIZE
[sfrench/cifs-2.6.git] / drivers / ide / legacy / hd.c
index 45ed03591cd88df752caeb58bea03379f6367cd8..661c12f6dda6628f1eac7fd34826bf45c159564d 100644 (file)
@@ -130,7 +130,7 @@ struct hd_i_struct {
        
 #ifdef HD_TYPE
 static struct hd_i_struct hd_info[] = { HD_TYPE };
-static int NR_HD = ((sizeof (hd_info))/(sizeof (struct hd_i_struct)));
+static int NR_HD = ARRAY_SIZE(hd_info);
 #else
 static struct hd_i_struct hd_info[MAX_HD];
 static int NR_HD;