Commit 9ccc5f44 authored by Juston Li's avatar Juston Li Committed by Greg Kroah-Hartman

staging: sm750fb: add space before open parenthesis

Fixes checkpatch.pl error:
ERROR: space required before the open parenthesis '('
Signed-off-by: default avatarJuston Li <juston.h.li@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8332d94c
...@@ -49,7 +49,7 @@ static void setDisplayControl(int ctrl, int dispState) ...@@ -49,7 +49,7 @@ static void setDisplayControl(int ctrl, int dispState)
{ {
cnt++; cnt++;
POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg); POKE32(PANEL_DISPLAY_CTRL, ulDisplayCtrlReg);
} while((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) != } while ((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) !=
(ulDisplayCtrlReg & ~ulReservedBits)); (ulDisplayCtrlReg & ~ulReservedBits));
printk("Set Panel Plane enbit:after tried %d times\n", cnt); printk("Set Panel Plane enbit:after tried %d times\n", cnt);
} }
...@@ -104,7 +104,7 @@ static void setDisplayControl(int ctrl, int dispState) ...@@ -104,7 +104,7 @@ static void setDisplayControl(int ctrl, int dispState)
{ {
cnt++; cnt++;
POKE32(CRT_DISPLAY_CTRL, ulDisplayCtrlReg); POKE32(CRT_DISPLAY_CTRL, ulDisplayCtrlReg);
} while((PEEK32(CRT_DISPLAY_CTRL) & ~ulReservedBits) != } while ((PEEK32(CRT_DISPLAY_CTRL) & ~ulReservedBits) !=
(ulDisplayCtrlReg & ~ulReservedBits)); (ulDisplayCtrlReg & ~ulReservedBits));
printk("Set Crt Plane enbit:after tried %d times\n", cnt); printk("Set Crt Plane enbit:after tried %d times\n", cnt);
} }
...@@ -132,7 +132,7 @@ static void setDisplayControl(int ctrl, int dispState) ...@@ -132,7 +132,7 @@ static void setDisplayControl(int ctrl, int dispState)
static void waitNextVerticalSync(int ctrl, int delay) static void waitNextVerticalSync(int ctrl, int delay)
{ {
unsigned int status; unsigned int status;
if(!ctrl){ if (!ctrl){
/* primary controller */ /* primary controller */
/* Do not wait when the Primary PLL is off or display control is already off. /* Do not wait when the Primary PLL is off or display control is already off.
...@@ -233,14 +233,14 @@ static void swPanelPowerSequence(int disp, int delay) ...@@ -233,14 +233,14 @@ static void swPanelPowerSequence(int disp, int delay)
void ddk750_setLogicalDispOut(disp_output_t output) void ddk750_setLogicalDispOut(disp_output_t output)
{ {
unsigned int reg; unsigned int reg;
if(output & PNL_2_USAGE){ if (output & PNL_2_USAGE){
/* set panel path controller select */ /* set panel path controller select */
reg = PEEK32(PANEL_DISPLAY_CTRL); reg = PEEK32(PANEL_DISPLAY_CTRL);
reg = FIELD_VALUE(reg, PANEL_DISPLAY_CTRL, SELECT, (output & PNL_2_MASK)>>PNL_2_OFFSET); reg = FIELD_VALUE(reg, PANEL_DISPLAY_CTRL, SELECT, (output & PNL_2_MASK)>>PNL_2_OFFSET);
POKE32(PANEL_DISPLAY_CTRL, reg); POKE32(PANEL_DISPLAY_CTRL, reg);
} }
if(output & CRT_2_USAGE){ if (output & CRT_2_USAGE){
/* set crt path controller select */ /* set crt path controller select */
reg = PEEK32(CRT_DISPLAY_CTRL); reg = PEEK32(CRT_DISPLAY_CTRL);
reg = FIELD_VALUE(reg, CRT_DISPLAY_CTRL, SELECT, (output & CRT_2_MASK)>>CRT_2_OFFSET); reg = FIELD_VALUE(reg, CRT_DISPLAY_CTRL, SELECT, (output & CRT_2_MASK)>>CRT_2_OFFSET);
...@@ -250,25 +250,25 @@ void ddk750_setLogicalDispOut(disp_output_t output) ...@@ -250,25 +250,25 @@ void ddk750_setLogicalDispOut(disp_output_t output)
} }
if(output & PRI_TP_USAGE){ if (output & PRI_TP_USAGE){
/* set primary timing and plane en_bit */ /* set primary timing and plane en_bit */
setDisplayControl(0, (output&PRI_TP_MASK)>>PRI_TP_OFFSET); setDisplayControl(0, (output&PRI_TP_MASK)>>PRI_TP_OFFSET);
} }
if(output & SEC_TP_USAGE){ if (output & SEC_TP_USAGE){
/* set secondary timing and plane en_bit*/ /* set secondary timing and plane en_bit*/
setDisplayControl(1, (output&SEC_TP_MASK)>>SEC_TP_OFFSET); setDisplayControl(1, (output&SEC_TP_MASK)>>SEC_TP_OFFSET);
} }
if(output & PNL_SEQ_USAGE){ if (output & PNL_SEQ_USAGE){
/* set panel sequence */ /* set panel sequence */
swPanelPowerSequence((output&PNL_SEQ_MASK)>>PNL_SEQ_OFFSET, 4); swPanelPowerSequence((output&PNL_SEQ_MASK)>>PNL_SEQ_OFFSET, 4);
} }
if(output & DAC_USAGE) if (output & DAC_USAGE)
setDAC((output & DAC_MASK)>>DAC_OFFSET); setDAC((output & DAC_MASK)>>DAC_OFFSET);
if(output & DPMS_USAGE) if (output & DPMS_USAGE)
ddk750_setDPMS((output & DPMS_MASK) >> DPMS_OFFSET); ddk750_setDPMS((output & DPMS_MASK) >> DPMS_OFFSET);
} }
......
...@@ -45,7 +45,7 @@ int dviInit( ...@@ -45,7 +45,7 @@ int dviInit(
{ {
dvi_ctrl_device_t *pCurrentDviCtrl; dvi_ctrl_device_t *pCurrentDviCtrl;
pCurrentDviCtrl = g_dcftSupportedDviController; pCurrentDviCtrl = g_dcftSupportedDviController;
if(pCurrentDviCtrl->pfnInit != NULL) if (pCurrentDviCtrl->pfnInit != NULL)
{ {
return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable, return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable, vsyncEnable, deskewEnable, deskewSetting, continuousSyncEnable,
......
...@@ -10,7 +10,7 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId) ...@@ -10,7 +10,7 @@ void ddk750_set_mmio(void __iomem *addr, unsigned short devId, char revId)
mmio750 = addr; mmio750 = addr;
devId750 = devId; devId750 = devId;
revId750 = revId; revId750 = revId;
if(revId == 0xfe) if (revId == 0xfe)
printk("found sm750le\n"); printk("found sm750le\n");
} }
......
...@@ -80,7 +80,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) ...@@ -80,7 +80,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
int ret = 0; int ret = 0;
int cnt = 0; int cnt = 0;
unsigned int ulTmpValue, ulReg; unsigned int ulTmpValue, ulReg;
if(pll->clockType == SECONDARY_PLL) if (pll->clockType == SECONDARY_PLL)
{ {
/* programe secondary pixel clock */ /* programe secondary pixel clock */
POKE32(CRT_PLL_CTRL, formatPllReg(pll)); POKE32(CRT_PLL_CTRL, formatPllReg(pll));
...@@ -107,7 +107,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) ...@@ -107,7 +107,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
FIELD_SET(0, CRT_DISPLAY_CTRL, PLANE, ENABLE); FIELD_SET(0, CRT_DISPLAY_CTRL, PLANE, ENABLE);
if(getChipType() == SM750LE){ if (getChipType() == SM750LE){
displayControlAdjust_SM750LE(pModeParam, ulTmpValue); displayControlAdjust_SM750LE(pModeParam, ulTmpValue);
}else{ }else{
ulReg = PEEK32(CRT_DISPLAY_CTRL) ulReg = PEEK32(CRT_DISPLAY_CTRL)
...@@ -120,7 +120,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) ...@@ -120,7 +120,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
} }
} }
else if(pll->clockType == PRIMARY_PLL) else if (pll->clockType == PRIMARY_PLL)
{ {
unsigned int ulReservedBits; unsigned int ulReservedBits;
POKE32(PANEL_PLL_CTRL, formatPllReg(pll)); POKE32(PANEL_PLL_CTRL, formatPllReg(pll));
...@@ -170,10 +170,10 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) ...@@ -170,10 +170,10 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
POKE32(PANEL_DISPLAY_CTRL, ulTmpValue|ulReg); POKE32(PANEL_DISPLAY_CTRL, ulTmpValue|ulReg);
#if 1 #if 1
while((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) != (ulTmpValue|ulReg)) while ((PEEK32(PANEL_DISPLAY_CTRL) & ~ulReservedBits) != (ulTmpValue|ulReg))
{ {
cnt++; cnt++;
if(cnt > 1000) if (cnt > 1000)
break; break;
POKE32(PANEL_DISPLAY_CTRL, ulTmpValue|ulReg); POKE32(PANEL_DISPLAY_CTRL, ulTmpValue|ulReg);
} }
...@@ -193,7 +193,7 @@ int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock) ...@@ -193,7 +193,7 @@ int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock)
pll.clockType = clock; pll.clockType = clock;
uiActualPixelClk = calcPllValue(parm->pixel_clock, &pll); uiActualPixelClk = calcPllValue(parm->pixel_clock, &pll);
if(getChipType() == SM750LE){ if (getChipType() == SM750LE){
/* set graphic mode via IO method */ /* set graphic mode via IO method */
outb_p(0x88, 0x3d4); outb_p(0x88, 0x3d4);
outb_p(0x06, 0x3d5); outb_p(0x06, 0x3d5);
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
void ddk750_setDPMS(DPMS_t state) void ddk750_setDPMS(DPMS_t state)
{ {
unsigned int value; unsigned int value;
if(getChipType() == SM750LE){ if (getChipType() == SM750LE){
value = PEEK32(CRT_DISPLAY_CTRL); value = PEEK32(CRT_DISPLAY_CTRL);
POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state)); POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state));
}else{ }else{
...@@ -17,7 +17,7 @@ void ddk750_setDPMS(DPMS_t state) ...@@ -17,7 +17,7 @@ void ddk750_setDPMS(DPMS_t state)
unsigned int getPowerMode(void) unsigned int getPowerMode(void)
{ {
if(getChipType() == SM750LE) if (getChipType() == SM750LE)
return 0; return 0;
return (FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE)); return (FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE));
} }
...@@ -33,7 +33,7 @@ void setPowerMode(unsigned int powerMode) ...@@ -33,7 +33,7 @@ void setPowerMode(unsigned int powerMode)
control_value = PEEK32(POWER_MODE_CTRL); control_value = PEEK32(POWER_MODE_CTRL);
if(getChipType() == SM750LE) if (getChipType() == SM750LE)
return; return;
switch (powerMode) switch (powerMode)
......
...@@ -96,7 +96,7 @@ int hw_fillrect(struct lynx_accel *accel, ...@@ -96,7 +96,7 @@ int hw_fillrect(struct lynx_accel *accel,
{ {
u32 deCtrl; u32 deCtrl;
if(accel->de_wait() != 0) if (accel->de_wait() != 0)
{ {
/* int time wait and always busy,seems hardware /* int time wait and always busy,seems hardware
* got something error */ * got something error */
...@@ -248,7 +248,7 @@ unsigned int rop2) /* ROP value */ ...@@ -248,7 +248,7 @@ unsigned int rop2) /* ROP value */
Note that input pitch is BYTE value, but the 2D Pitch register uses Note that input pitch is BYTE value, but the 2D Pitch register uses
pixel values. Need Byte to pixel conversion. pixel values. Need Byte to pixel conversion.
*/ */
if(Bpp == 3){ if (Bpp == 3){
sx *= 3; sx *= 3;
dx *= 3; dx *= 3;
width *= 3; width *= 3;
...@@ -344,7 +344,7 @@ int hw_imageblit(struct lynx_accel *accel, ...@@ -344,7 +344,7 @@ int hw_imageblit(struct lynx_accel *accel,
ul4BytesPerScan = ulBytesPerScan & ~3; ul4BytesPerScan = ulBytesPerScan & ~3;
ulBytesRemain = ulBytesPerScan & 3; ulBytesRemain = ulBytesPerScan & 3;
if(accel->de_wait() != 0) if (accel->de_wait() != 0)
{ {
return -1; return -1;
} }
...@@ -363,7 +363,7 @@ int hw_imageblit(struct lynx_accel *accel, ...@@ -363,7 +363,7 @@ int hw_imageblit(struct lynx_accel *accel,
Note that input pitch is BYTE value, but the 2D Pitch register uses Note that input pitch is BYTE value, but the 2D Pitch register uses
pixel values. Need Byte to pixel conversion. pixel values. Need Byte to pixel conversion.
*/ */
if(bytePerPixel == 3){ if (bytePerPixel == 3){
dx *= 3; dx *= 3;
width *= 3; width *= 3;
startBit *= 3; startBit *= 3;
......
...@@ -122,7 +122,7 @@ void hw_cursor_setData(struct lynx_cursor *cursor, ...@@ -122,7 +122,7 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
odd=0; odd=0;
*/ */
for(i=0;i<count;i++) for (i=0;i<count;i++)
{ {
color = *pcol++; color = *pcol++;
mask = *pmsk++; mask = *pmsk++;
...@@ -132,15 +132,15 @@ void hw_cursor_setData(struct lynx_cursor *cursor, ...@@ -132,15 +132,15 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
* but method 2 shows no lag * but method 2 shows no lag
* and method 1 seems a bit wrong*/ * and method 1 seems a bit wrong*/
#if 0 #if 0
if(rop == ROP_XOR) if (rop == ROP_XOR)
opr = mask ^ color; opr = mask ^ color;
else else
opr = mask & color; opr = mask & color;
for(j=0;j<8;j++) for (j=0;j<8;j++)
{ {
if(opr & (0x80 >> j)) if (opr & (0x80 >> j))
{ /* use fg color,id = 2 */ { /* use fg color,id = 2 */
data |= 2 << (j*2); data |= 2 << (j*2);
}else{ }else{
...@@ -149,9 +149,9 @@ void hw_cursor_setData(struct lynx_cursor *cursor, ...@@ -149,9 +149,9 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
} }
} }
#else #else
for(j=0;j<8;j++){ for (j=0;j<8;j++){
if(mask & (0x80>>j)){ if (mask & (0x80>>j)){
if(rop == ROP_XOR) if (rop == ROP_XOR)
opr = mask ^ color; opr = mask ^ color;
else else
opr = mask & color; opr = mask & color;
...@@ -165,9 +165,9 @@ void hw_cursor_setData(struct lynx_cursor *cursor, ...@@ -165,9 +165,9 @@ void hw_cursor_setData(struct lynx_cursor *cursor,
/* assume pitch is 1,2,4,8,...*/ /* assume pitch is 1,2,4,8,...*/
#if 0 #if 0
if(!((i+1)&(pitch-1))) /* below line equal to is line */ if (!((i+1)&(pitch-1))) /* below line equal to is line */
#else #else
if((i+1) % pitch == 0) if ((i+1) % pitch == 0)
#endif #endif
{ {
/* need a return */ /* need a return */
...@@ -204,7 +204,7 @@ void hw_cursor_setData2(struct lynx_cursor *cursor, ...@@ -204,7 +204,7 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
pstart = cursor->vstart; pstart = cursor->vstart;
pbuffer = pstart; pbuffer = pstart;
for(i=0;i<count;i++) for (i=0;i<count;i++)
{ {
color = *pcol++; color = *pcol++;
mask = *pmsk++; mask = *pmsk++;
...@@ -212,15 +212,15 @@ void hw_cursor_setData2(struct lynx_cursor *cursor, ...@@ -212,15 +212,15 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
/* either method below works well, but method 2 shows no lag */ /* either method below works well, but method 2 shows no lag */
#if 0 #if 0
if(rop == ROP_XOR) if (rop == ROP_XOR)
opr = mask ^ color; opr = mask ^ color;
else else
opr = mask & color; opr = mask & color;
for(j=0;j<8;j++) for (j=0;j<8;j++)
{ {
if(opr & (0x80 >> j)) if (opr & (0x80 >> j))
{ /* use fg color,id = 2 */ { /* use fg color,id = 2 */
data |= 2 << (j*2); data |= 2 << (j*2);
}else{ }else{
...@@ -229,15 +229,15 @@ void hw_cursor_setData2(struct lynx_cursor *cursor, ...@@ -229,15 +229,15 @@ void hw_cursor_setData2(struct lynx_cursor *cursor,
} }
} }
#else #else
for(j=0;j<8;j++){ for (j=0;j<8;j++){
if(mask & (1<<j)) if (mask & (1<<j))
data |= ((color & (1<<j))?1:2)<<(j*2); data |= ((color & (1<<j))?1:2)<<(j*2);
} }
#endif #endif
iowrite16(data, pbuffer); iowrite16(data, pbuffer);
/* assume pitch is 1,2,4,8,...*/ /* assume pitch is 1,2,4,8,...*/
if(!(i&(pitch-1))) if (!(i&(pitch-1)))
{ {
/* need a return */ /* need a return */
pstart += offset; pstart += offset;
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
static inline unsigned int absDiff(unsigned int a, unsigned int b) static inline unsigned int absDiff(unsigned int a, unsigned int b)
{ {
if(a<b) if (a<b)
return b-a; return b-a;
else else
return a-b; return a-b;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment