Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: sm750fb: remove '#if 1' conditionals

The code enclosed in '#if 1' anyway gets compiled. Removing useless
conditionals.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Mike Rapoport and committed by
Greg Kroah-Hartman
cfac7d6a f741554e

+7 -12
+5 -8
drivers/staging/sm750fb/ddk750_chip.c
··· 60 60 { 61 61 pll_value_t pll; 62 62 unsigned int ulActualMxClk; 63 - #if 1 63 + 64 64 /* Cheok_0509: For SM750LE, the chip clock is fixed. Nothing to set. */ 65 65 if (getChipType() == SM750LE) 66 66 return; 67 - #endif 68 67 69 68 if (frequency) { 70 69 /* ··· 87 88 static void setMemoryClock(unsigned int frequency) 88 89 { 89 90 unsigned int ulReg, divisor; 90 - #if 1 91 + 91 92 /* Cheok_0509: For SM750LE, the memory clock is fixed. Nothing to set. */ 92 93 if (getChipType() == SM750LE) 93 94 return; 94 - #endif 95 + 95 96 if (frequency) { 96 97 /* Set the frequency to the maximum frequency that the DDR Memory can take 97 98 which is 336MHz. */ ··· 134 135 static void setMasterClock(unsigned int frequency) 135 136 { 136 137 unsigned int ulReg, divisor; 137 - #if 1 138 + 138 139 /* Cheok_0509: For SM750LE, the memory clock is fixed. Nothing to set. */ 139 140 if (getChipType() == SM750LE) 140 141 return; 141 - #endif 142 + 142 143 if (frequency) { 143 144 /* Set the frequency to the maximum frequency that the SM750 engine can 144 145 run, which is about 190 MHz. */ ··· 331 332 unsigned int tmpClock, ret; 332 333 pllcalparam *xparm; 333 334 334 - #if 1 335 335 if (getChipType() == SM750LE) { 336 336 /* SM750LE don't have prgrammable PLL and M/N values to work on. 337 337 Just return the requested clock. */ 338 338 return request_orig; 339 339 } 340 - #endif 341 340 342 341 ret = 0; 343 342 mini_diff = ~0;
+1 -2
drivers/staging/sm750fb/ddk750_mode.c
··· 168 168 */ 169 169 170 170 POKE32(PANEL_DISPLAY_CTRL, ulTmpValue|ulReg); 171 - #if 1 171 + 172 172 while ((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) != (ulTmpValue|ulReg)) { 173 173 cnt++; 174 174 if (cnt > 1000) 175 175 break; 176 176 POKE32(PANEL_DISPLAY_CTRL, ulTmpValue|ulReg); 177 177 } 178 - #endif 179 178 } else { 180 179 ret = -1; 181 180 }
+1 -2
drivers/staging/sm750fb/sm750_hw.c
··· 276 276 ret = 0; 277 277 par = container_of(crtc, struct lynxfb_par, crtc); 278 278 share = par->share; 279 - #if 1 279 + 280 280 if (!share->accel_off) { 281 281 /* set 2d engine pixel format according to mode bpp */ 282 282 switch (var->bits_per_pixel) { ··· 293 293 } 294 294 hw_set2dformat(&share->accel, fmt); 295 295 } 296 - #endif 297 296 298 297 /* set timing */ 299 298 modparm.pixel_clock = ps_to_hz(var->pixclock);