spi: move common spi_setup() functionality into core
authorDavid Brownell <dbrownell@users.sourceforge.net>
Wed, 17 Jun 2009 23:26:03 +0000 (16:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2009 20:03:42 +0000 (13:03 -0700)
commit7d0771970c51e736758525dd71fb82dd036b823a
tree9ff72b89cd06cd67e0db681859606dd77f5cba80
parentb4bd2ababd20b6ecdd49cf96e39c875fbedd53af
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>
15 files changed:
drivers/spi/atmel_spi.c
drivers/spi/au1550_spi.c
drivers/spi/omap2_mcspi.c
drivers/spi/omap_uwire.c
drivers/spi/orion_spi.c
drivers/spi/pxa2xx_spi.c
drivers/spi/spi.c
drivers/spi/spi_bfin5xx.c
drivers/spi/spi_bitbang.c
drivers/spi/spi_imx.c
drivers/spi/spi_mpc83xx.c
drivers/spi/spi_s3c24xx.c
drivers/spi/spi_txx9.c
drivers/spi/xilinx_spi.c
include/linux/spi/spi.h