aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/atmel_spi.c
diff options
context:
space:
mode:
authorDavid Brownell <dbrownell@users.sourceforge.net>2009-06-17 19:26:03 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 16:03:42 -0400
commit7d0771970c51e736758525dd71fb82dd036b823a (patch)
tree9ff72b89cd06cd67e0db681859606dd77f5cba80 /drivers/spi/atmel_spi.c
parentb4bd2ababd20b6ecdd49cf96e39c875fbedd53af (diff)
spi: move common spi_setup() functionality into core
Start moving some spi_setup() functionality into the SPI core from the various spi_master controller drivers: - Make that function stop being an inline; - Move two common idioms from drivers into that new function: * Default bits_per_word to 8 if that field isn't set * Issue a standardized dev_dbg() message This is a net minor source code shrink, and supports enhancments found in some follow-up patches. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/spi/atmel_spi.c')
-rw-r--r--drivers/spi/atmel_spi.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c
index 12e443cc4ac9..9f9ff3af72d7 100644
--- a/drivers/spi/atmel_spi.c
+++ b/drivers/spi/atmel_spi.c
@@ -555,8 +555,6 @@ static int atmel_spi_setup(struct spi_device *spi)
555 return -EINVAL; 555 return -EINVAL;
556 } 556 }
557 557
558 if (bits == 0)
559 bits = 8;
560 if (bits < 8 || bits > 16) { 558 if (bits < 8 || bits > 16) {
561 dev_dbg(&spi->dev, 559 dev_dbg(&spi->dev,
562 "setup: invalid bits_per_word %u (8 to 16)\n", 560 "setup: invalid bits_per_word %u (8 to 16)\n",