spi: davinci: request cs_gpio's from probe
authorGrygorii Strashko <grygorii.strashko@ti.com>
Fri, 12 Sep 2014 14:54:00 +0000 (17:54 +0300)
committerMark Brown <broonie@kernel.org>
Sat, 13 Sep 2014 16:25:46 +0000 (09:25 -0700)
commit8936decdd977ee614234153a1aba85d12329fa7a
treefabcd93df3fb6f3f901e28abd529609f6eb7c4c1
parent7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9
spi: davinci: request cs_gpio's from probe

Now CS GPIOs are requested from struct spi_master.setup() callback
and that causes failures when Client SPI device is getting accessed
through SPIDEV driver. The failure happens, because .setup() callback
may be called many times from IOCTL handler and when it's called
second time gpio_request() will fail and return -EBUSY.

Hence, fix it by moving CS GPIOs requesting code in .probe().

Reported-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-davinci.c