From 83fae3970ec3ae5f9288643599c4d21edad6e572 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Tue, 6 Dec 2011 00:10:32 +0200 Subject: [PATCH] staging: xgifb: ReadVBIOSTablData(): use ARRAY_SIZE Use ARRAY_SIZE. Signed-off-by: Aaro Koskinen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/xgifb/vb_init.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index c9b5285b7cb..a1caf3cf44c 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c @@ -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, -- 2.39.5