From: David Rientjes Date: Fri, 8 Dec 2006 10:40:19 +0000 (-0800) Subject: [PATCH] video SiS: remove unnecessary variables in SiS_DDC2Delay X-Git-Tag: v2.6.20-rc1~34^2~94 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=b860e73a5488d9e75c2f2907174cb4277c2f9d21;p=linux-2.6-omap-h63xx.git [PATCH] video SiS: remove unnecessary variables in SiS_DDC2Delay Remove unnecesary iteration and accumulator variables from SiS_DDC2Delay. Originally spotted by Jesper Juhl . Cc: Jesper Juhl Cc: Thomas Winischhofer Signed-off-by: David Rientjes Cc: "Antonino A. Daplas" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/sis/init301.c b/drivers/video/sis/init301.c index f13faddc618..47e1896cffe 100644 --- a/drivers/video/sis/init301.c +++ b/drivers/video/sis/init301.c @@ -445,11 +445,8 @@ SiS_CR36BIOSWord23d(struct SiS_Private *SiS_Pr) void SiS_DDC2Delay(struct SiS_Private *SiS_Pr, unsigned int delaytime) { - unsigned int i, j; - - for(i = 0; i < delaytime; i++) { - j += SiS_GetReg(SiS_Pr->SiS_P3c4,0x05); - } + while (delaytime-- > 0) + SiS_GetReg(SiS_Pr->SiS_P3c4, 0x05); } #if defined(SIS300) || defined(SIS315H)