From 7d0771970c51e736758525dd71fb82dd036b823a Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 17 Jun 2009 16:26:03 -0700 Subject: 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/orion_spi.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/spi/orion_spi.c') diff --git a/drivers/spi/orion_spi.c b/drivers/spi/orion_spi.c index c8b0babdc2a6..6d5e33bb4b4a 100644 --- a/drivers/spi/orion_spi.c +++ b/drivers/spi/orion_spi.c @@ -369,9 +369,6 @@ static int orion_spi_setup(struct spi_device *spi) orion_spi_setbits(orion_spi, ORION_SPI_IF_CONFIG_REG, (1 << 14)); - if (spi->bits_per_word == 0) - spi->bits_per_word = 8; - if ((spi->max_speed_hz == 0) || (spi->max_speed_hz > orion_spi->max_speed)) spi->max_speed_hz = orion_spi->max_speed; -- cgit v1.2.1