]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit2b469225b7708822bd84addd4fac7ff5863982fd
treefabcd93df3fb6f3f901e28abd529609f6eb7c4c1
parentf45f9587f1dd1e89dd1c89561c9572f777c5bcb7
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