staging: xgifb: ReadVBIOSTablData(): use ARRAY_SIZE
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 5 Dec 2011 22:10:32 +0000 (00:10 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Dec 2011 20:26:01 +0000 (12:26 -0800)
Use ARRAY_SIZE.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/xgifb/vb_init.c

index c9b5285..a1caf3c 100644 (file)
@@ -1148,9 +1148,7 @@ static void ReadVBIOSTablData(unsigned char ChipType,
                i += 25;
                j--;
                k++;
-       } while ((j > 0) &&
-                (k < (sizeof(XGI21_LCDCapList) /
-                              sizeof(struct XGI21_LVDSCapStruct))));
+       } while (j > 0 && k < ARRAY_SIZE(XGI21_LCDCapList));
 }
 
 static void XGINew_ChkSenseStatus(struct xgi_hw_device_info *HwDeviceExtension,