]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
video: valkyriefb: Fix unused variable warning in set_valkyrie_clock()
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 14 Sep 2014 09:48:30 +0000 (11:48 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 30 Sep 2014 09:43:23 +0000 (12:43 +0300)
If CONFIG_ADB_CUDA=n:

drivers/video/fbdev/valkyriefb.c: In function ‘set_valkyrie_clock’:
drivers/video/fbdev/valkyriefb.c:267: warning: unused variable ‘i’
drivers/video/fbdev/valkyriefb.c:266: warning: unused variable ‘req’

Move the variable declarations inside the existing #ifdef section to fix
this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/fbdev/valkyriefb.c

index 97cb9bd1d1ddb75f48abe8546c555f6160b7a0b1..b6ed09f16355f583e2c8ba46575d1d75e3b2a3ff 100644 (file)
@@ -263,10 +263,10 @@ static inline int valkyrie_vram_reqd(int video_mode, int color_mode)
 
 static void set_valkyrie_clock(unsigned char *params)
 {
+#ifdef CONFIG_ADB_CUDA
        struct adb_request req;
        int i;
 
-#ifdef CONFIG_ADB_CUDA
        for (i = 0; i < 3; ++i) {
                cuda_request(&req, NULL, 5, CUDA_PACKET, CUDA_GET_SET_IIC,
                             0x50, i + 1, params[i]);