]> git.baikalelectronics.ru Git - kernel.git/commit
spi: atmel: use managed resource for gpio chip select
authorNicolas Ferre <nicolas.ferre@atmel.com>
Tue, 8 Nov 2016 17:48:52 +0000 (18:48 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 9 Nov 2016 13:04:17 +0000 (13:04 +0000)
commitdb02e5add2df0cb8e98a5fe39682ea56f3315f31
tree2b1a6a4eab45a3e472eff39a7e23ff5211b2bc37
parenta245803230f587f66ceddc152f3504b2a960aac2
spi: atmel: use managed resource for gpio chip select

Use the managed gpio CS pin request so that we avoid having trouble
in the cleanup code.
In fact, if module was configured with DT, cleanup code released
invalid pin.  Since resource wasn't freed, module cannot be reinserted.

This require to extract the gpio request call from the "setup" function
and call it in the appropriate probe function.

Reported-by: Alexander Morozov <linux@meltdown.ru>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-atmel.c