aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi_s3c24xx.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/spi_s3c24xx.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/spi_s3c24xx.c')
-rw-r--r--drivers/spi/spi_s3c24xx.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
index b3ebc1d0f85f..18a4c7f54380 100644
--- a/drivers/spi/spi_s3c24xx.c
+++ b/drivers/spi/spi_s3c24xx.c
@@ -153,9 +153,6 @@ static int s3c24xx_spi_setup(struct spi_device *spi)
153{ 153{
154 int ret; 154 int ret;
155 155
156 if (!spi->bits_per_word)
157 spi->bits_per_word = 8;
158
159 if (spi->mode & ~MODEBITS) { 156 if (spi->mode & ~MODEBITS) {
160 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n", 157 dev_dbg(&spi->dev, "setup: unsupported mode bits %x\n",
161 spi->mode & ~MODEBITS); 158 spi->mode & ~MODEBITS);
@@ -168,10 +165,6 @@ static int s3c24xx_spi_setup(struct spi_device *spi)
168 return ret; 165 return ret;
169 } 166 }
170 167
171 dev_dbg(&spi->dev, "%s: mode %d, %u bpw, %d hz\n",
172 __func__, spi->mode, spi->bits_per_word,
173 spi->max_speed_hz);
174
175 return 0; 168 return 0;
176} 169}
177 170