aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-bitbang.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-10-13 21:33:38 -0400
committerMark Brown <broonie@linaro.org>2013-10-14 13:23:48 -0400
commitcff93c58f7a99b3bf2fc3b343a1b6ca0546120da (patch)
tree456cf0c7a99be03b97726d0dd7714533be4fb4cb /drivers/spi/spi-bitbang.c
parent702a4879ec337463f858c8ab467482cce260bf18 (diff)
spi: bitbang: Fix checkpatch issue
Fix the following checkpatch warnings WARNING: sizeof *cs should be sizeof(*cs) WARNING: please, no space before tabs WARNING: space prohibited between function name and open parenthesis '(' WARNING: line over 80 characters Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-bitbang.c')
-rw-r--r--drivers/spi/spi-bitbang.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c
index 0056623dfc6b..bd222f6b677d 100644
--- a/drivers/spi/spi-bitbang.c
+++ b/drivers/spi/spi-bitbang.c
@@ -191,7 +191,7 @@ int spi_bitbang_setup(struct spi_device *spi)
191 bitbang = spi_master_get_devdata(spi->master); 191 bitbang = spi_master_get_devdata(spi->master);
192 192
193 if (!cs) { 193 if (!cs) {
194 cs = kzalloc(sizeof *cs, GFP_KERNEL); 194 cs = kzalloc(sizeof(*cs), GFP_KERNEL);
195 if (!cs) 195 if (!cs)
196 return -ENOMEM; 196 return -ENOMEM;
197 spi->controller_state = cs; 197 spi->controller_state = cs;
@@ -258,7 +258,7 @@ static int spi_bitbang_bufs(struct spi_device *spi, struct spi_transfer *t)
258 258
259static int spi_bitbang_prepare_hardware(struct spi_master *spi) 259static int spi_bitbang_prepare_hardware(struct spi_master *spi)
260{ 260{
261 struct spi_bitbang *bitbang; 261 struct spi_bitbang *bitbang;
262 unsigned long flags; 262 unsigned long flags;
263 263
264 bitbang = spi_master_get_devdata(spi); 264 bitbang = spi_master_get_devdata(spi);
@@ -273,7 +273,7 @@ static int spi_bitbang_prepare_hardware(struct spi_master *spi)
273static int spi_bitbang_transfer_one(struct spi_master *master, 273static int spi_bitbang_transfer_one(struct spi_master *master,
274 struct spi_message *m) 274 struct spi_message *m)
275{ 275{
276 struct spi_bitbang *bitbang; 276 struct spi_bitbang *bitbang;
277 unsigned nsecs; 277 unsigned nsecs;
278 struct spi_transfer *t = NULL; 278 struct spi_transfer *t = NULL;
279 unsigned cs_change; 279 unsigned cs_change;
@@ -292,7 +292,7 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
292 cs_change = 1; 292 cs_change = 1;
293 status = 0; 293 status = 0;
294 294
295 list_for_each_entry (t, &m->transfers, transfer_list) { 295 list_for_each_entry(t, &m->transfers, transfer_list) {
296 296
297 /* override speed or wordsize? */ 297 /* override speed or wordsize? */
298 if (t->speed_hz || t->bits_per_word) 298 if (t->speed_hz || t->bits_per_word)
@@ -349,7 +349,8 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
349 if (t->delay_usecs) 349 if (t->delay_usecs)
350 udelay(t->delay_usecs); 350 udelay(t->delay_usecs);
351 351
352 if (cs_change && !list_is_last(&t->transfer_list, &m->transfers)) { 352 if (cs_change &&
353 !list_is_last(&t->transfer_list, &m->transfers)) {
353 /* sometimes a short mid-message deselect of the chip 354 /* sometimes a short mid-message deselect of the chip
354 * may be needed to terminate a mode or command 355 * may be needed to terminate a mode or command
355 */ 356 */
@@ -378,7 +379,7 @@ static int spi_bitbang_transfer_one(struct spi_master *master,
378 379
379static int spi_bitbang_unprepare_hardware(struct spi_master *spi) 380static int spi_bitbang_unprepare_hardware(struct spi_master *spi)
380{ 381{
381 struct spi_bitbang *bitbang; 382 struct spi_bitbang *bitbang;
382 unsigned long flags; 383 unsigned long flags;
383 384
384 bitbang = spi_master_get_devdata(spi); 385 bitbang = spi_master_get_devdata(spi);