mfd: mc13xxx: Add missing spi_setup()
authorAlexander Shiyan <shc_work@mail.ru>
Sun, 2 Mar 2014 07:44:34 +0000 (11:44 +0400)
committerLee Jones <lee.jones@linaro.org>
Wed, 19 Mar 2014 08:58:35 +0000 (08:58 +0000)
The probe routine should call spi_setup() to configure the SPI bus
so it can properly communicate with the device.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/mc13xxx-spi.c

index ee81a67207dea56e77a43a373c3068261b8fed73..702925e242c90597618bb1158faffa653516eae6 100644 (file)
@@ -141,6 +141,9 @@ static int mc13xxx_spi_probe(struct spi_device *spi)
        mc13xxx->irq = spi->irq;
 
        spi->max_speed_hz = spi->max_speed_hz ? : 26000000;
+       ret = spi_setup(spi);
+       if (ret)
+               return ret;
 
        mc13xxx->regmap = devm_regmap_init(&spi->dev, &regmap_mc13xxx_bus,
                                           &spi->dev,