spi: omap2-mcspi: Prevent duplicate gpio_request
authorMichael Welling <mwelling@ieee.org>
Mon, 30 Nov 2015 15:02:39 +0000 (09:02 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Mar 2016 23:07:10 +0000 (15:07 -0800)
commit50d60403753a0149c82e5b1851e0cd0499ddff4e
treef5f0f15f60544d62b04c64cec083cfabf1d75fb4
parent3e908446627523e106c1edc7cf6fe7706924d6d3
spi: omap2-mcspi: Prevent duplicate gpio_request

commit 2f538c017e1a8620d19553931199c6d6a6d31bb2 upstream.

Occasionally the setup function will be called multiple times. Only request
the gpio the first time otherwise -EBUSY will occur on subsequent calls to
setup.

Reported-by: Joseph Bell <joe@iachieved.it>
Signed-off-by: Michael Welling <mwelling@ieee.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/spi/spi-omap2-mcspi.c