diff options
author | Isaac Assegai <isaac.a.travers@gmail.com> | 2015-06-19 00:48:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-06-19 01:10:02 -0400 |
commit | d3f431d0ffced1db5d3567173f8984c5a5c74a1a (patch) | |
tree | 55e702f355679477c5512f68e7aeeb66c272b24f | |
parent | 6d43b0f482561ab421a91ebf59a51192d66cf8a7 (diff) |
Staging: sm750fb: ddk750_swi2c.c: Place braces on correct lines
Place braces on correct lines in ddk750_swi2c.c
to rectify the following checkpatch errors:
ERROR: that open brace { should be on the previous line
Signed-off-by: Isaac Assegai <isaac.a.travers@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/sm750fb/ddk750_swi2c.c | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/drivers/staging/sm750fb/ddk750_swi2c.c b/drivers/staging/sm750fb/ddk750_swi2c.c index a5878353b4dc..2cf3514ac59a 100644 --- a/drivers/staging/sm750fb/ddk750_swi2c.c +++ b/drivers/staging/sm750fb/ddk750_swi2c.c | |||
@@ -100,8 +100,7 @@ static void swI2CWait(void) | |||
100 | #else | 100 | #else |
101 | int i, Temp; | 101 | int i, Temp; |
102 | 102 | ||
103 | for(i = 0; i < 600; i++) | 103 | for(i = 0; i < 600; i++) { |
104 | { | ||
105 | Temp = i; | 104 | Temp = i; |
106 | Temp += i; | 105 | Temp += i; |
107 | } | 106 | } |
@@ -126,14 +125,11 @@ void swI2CSCL(unsigned char value) | |||
126 | unsigned long ulGPIODirection; | 125 | unsigned long ulGPIODirection; |
127 | 126 | ||
128 | ulGPIODirection = PEEK32(g_i2cClkGPIODataDirReg); | 127 | ulGPIODirection = PEEK32(g_i2cClkGPIODataDirReg); |
129 | if (value) /* High */ | 128 | if (value) { /* High */ |
130 | { | ||
131 | /* Set direction as input. This will automatically pull the signal up. */ | 129 | /* Set direction as input. This will automatically pull the signal up. */ |
132 | ulGPIODirection &= ~(1 << g_i2cClockGPIO); | 130 | ulGPIODirection &= ~(1 << g_i2cClockGPIO); |
133 | POKE32(g_i2cClkGPIODataDirReg, ulGPIODirection); | 131 | POKE32(g_i2cClkGPIODataDirReg, ulGPIODirection); |
134 | } | 132 | } else { /* Low */ |
135 | else /* Low */ | ||
136 | { | ||
137 | /* Set the signal down */ | 133 | /* Set the signal down */ |
138 | ulGPIOData = PEEK32(g_i2cClkGPIODataReg); | 134 | ulGPIOData = PEEK32(g_i2cClkGPIODataReg); |
139 | ulGPIOData &= ~(1 << g_i2cClockGPIO); | 135 | ulGPIOData &= ~(1 << g_i2cClockGPIO); |
@@ -163,14 +159,11 @@ void swI2CSDA(unsigned char value) | |||
163 | unsigned long ulGPIODirection; | 159 | unsigned long ulGPIODirection; |
164 | 160 | ||
165 | ulGPIODirection = PEEK32(g_i2cDataGPIODataDirReg); | 161 | ulGPIODirection = PEEK32(g_i2cDataGPIODataDirReg); |
166 | if (value) /* High */ | 162 | if (value) { /* High */ |
167 | { | ||
168 | /* Set direction as input. This will automatically pull the signal up. */ | 163 | /* Set direction as input. This will automatically pull the signal up. */ |
169 | ulGPIODirection &= ~(1 << g_i2cDataGPIO); | 164 | ulGPIODirection &= ~(1 << g_i2cDataGPIO); |
170 | POKE32(g_i2cDataGPIODataDirReg, ulGPIODirection); | 165 | POKE32(g_i2cDataGPIODataDirReg, ulGPIODirection); |
171 | } | 166 | } else { /* Low */ |
172 | else /* Low */ | ||
173 | { | ||
174 | /* Set the signal down */ | 167 | /* Set the signal down */ |
175 | ulGPIOData = PEEK32(g_i2cDataGPIODataReg); | 168 | ulGPIOData = PEEK32(g_i2cDataGPIODataReg); |
176 | ulGPIOData &= ~(1 << g_i2cDataGPIO); | 169 | ulGPIOData &= ~(1 << g_i2cDataGPIO); |
@@ -195,8 +188,7 @@ static unsigned char swI2CReadSDA(void) | |||
195 | 188 | ||
196 | /* Make sure that the direction is input (High) */ | 189 | /* Make sure that the direction is input (High) */ |
197 | ulGPIODirection = PEEK32(g_i2cDataGPIODataDirReg); | 190 | ulGPIODirection = PEEK32(g_i2cDataGPIODataDirReg); |
198 | if ((ulGPIODirection & (1 << g_i2cDataGPIO)) != (~(1 << g_i2cDataGPIO))) | 191 | if ((ulGPIODirection & (1 << g_i2cDataGPIO)) != (~(1 << g_i2cDataGPIO))) { |
199 | { | ||
200 | ulGPIODirection &= ~(1 << g_i2cDataGPIO); | 192 | ulGPIODirection &= ~(1 << g_i2cDataGPIO); |
201 | POKE32(g_i2cDataGPIODataDirReg, ulGPIODirection); | 193 | POKE32(g_i2cDataGPIODataDirReg, ulGPIODirection); |
202 | } | 194 | } |
@@ -255,8 +247,7 @@ static long swI2CWriteByte(unsigned char data) | |||
255 | int i; | 247 | int i; |
256 | 248 | ||
257 | /* Sending the data bit by bit */ | 249 | /* Sending the data bit by bit */ |
258 | for (i = 0; i < 8; i++) | 250 | for (i = 0; i < 8; i++) { |
259 | { | ||
260 | /* Set SCL to low */ | 251 | /* Set SCL to low */ |
261 | swI2CSCL(0); | 252 | swI2CSCL(0); |
262 | 253 | ||
@@ -286,8 +277,7 @@ static long swI2CWriteByte(unsigned char data) | |||
286 | swI2CWait(); | 277 | swI2CWait(); |
287 | 278 | ||
288 | /* Read SDA, until SDA==0 */ | 279 | /* Read SDA, until SDA==0 */ |
289 | for(i = 0; i < 0xff; i++) | 280 | for(i = 0; i < 0xff; i++) { |
290 | { | ||
291 | if (!swI2CReadSDA()) | 281 | if (!swI2CReadSDA()) |
292 | break; | 282 | break; |
293 | 283 | ||
@@ -322,8 +312,7 @@ static unsigned char swI2CReadByte(unsigned char ack) | |||
322 | int i; | 312 | int i; |
323 | unsigned char data = 0; | 313 | unsigned char data = 0; |
324 | 314 | ||
325 | for(i = 7; i >= 0; i--) | 315 | for(i = 7; i >= 0; i--) { |
326 | { | ||
327 | /* Set the SCL to Low and SDA to High (Input) */ | 316 | /* Set the SCL to Low and SDA to High (Input) */ |
328 | swI2CSCL(0); | 317 | swI2CSCL(0); |
329 | swI2CSDA(1); | 318 | swI2CSDA(1); |
@@ -510,8 +499,7 @@ long swI2CWriteReg( | |||
510 | */ | 499 | */ |
511 | if ((swI2CWriteByte(deviceAddress) != 0) || | 500 | if ((swI2CWriteByte(deviceAddress) != 0) || |
512 | (swI2CWriteByte(registerIndex) != 0) || | 501 | (swI2CWriteByte(registerIndex) != 0) || |
513 | (swI2CWriteByte(data) != 0)) | 502 | (swI2CWriteByte(data) != 0)) { |
514 | { | ||
515 | returnValue = -1; | 503 | returnValue = -1; |
516 | } | 504 | } |
517 | 505 | ||