Sifan Naeem b03ba9e314 spi: img-spfi: fix multiple calls to request gpio
spfi_setup may be called many times by the spi framework, but
gpio_request_one can only be called once without freeing, repeatedly
calling gpio_request_one will cause an error to be thrown, which
causes the request to spi_setup to be marked as failed.

We can have a per-spi_device flag that indicates whether or not the
gpio has been requested. If the gpio has already been requested use
gpio_direction_output to set the direction of the gpio.

Fixes: 8c2c8c03cdcb ("spi: img-spfi: Control CS lines with GPIO")
Signed-off-by: Sifan Naeem <sifan.naeem@imgtec.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
2015-08-04 18:46:54 +01:00
..
2015-06-26 11:54:29 -07:00
2015-07-01 14:44:22 -07:00
2015-07-10 12:16:59 -07:00
2015-07-02 14:40:49 -07:00
2015-06-26 14:51:15 -07:00
2015-07-01 19:40:18 -07:00
2015-07-05 10:54:09 -07:00
2015-07-02 14:40:49 -07:00
2015-07-02 14:40:49 -07:00
2015-06-28 12:32:13 -07:00
2015-07-03 16:02:25 -07:00