spi/imx: remove redundant config.speed_hz setting
authorHui Wang <jason77.wang@gmail.com>
Fri, 13 Jul 2012 02:51:28 +0000 (10:51 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 13 Jul 2012 10:01:46 +0000 (11:01 +0100)
The config.speed_hz is just setted at the two lines ahead of it,
obviously we don't need to copy the code to set the config.speed_hz
again. Remove it for a cleanup.

Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Hui Wang <jason77.wang@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/spi/spi-imx.c

index 47877d687614fbeb9867ac34b8052fe83bc68b90..c12052fef68cc45a2bf9a4a67b62c939ee718d19 100644 (file)
@@ -688,8 +688,6 @@ static int spi_imx_setupxfer(struct spi_device *spi,
                config.speed_hz = spi->max_speed_hz;
        if (!config.bpw)
                config.bpw = spi->bits_per_word;
-       if (!config.speed_hz)
-               config.speed_hz = spi->max_speed_hz;
 
        /* Initialize the functions for transfer */
        if (config.bpw <= 8) {