fpga: altera-ps-spi: Fix getting of optional confd gpio
authorPhil Reid <preid@electromag.com.au>
Thu, 25 Jul 2019 02:48:45 +0000 (10:48 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Sep 2019 05:15:32 +0000 (07:15 +0200)
commit1399e6a5f1e7b543bfcc90b4e84197348df601b0
tree746d78e785e56975c6fb8abd8c2ad2ff200f3910
parentb212f27cfbd181c7687816b0992b335de02ee4de
fpga: altera-ps-spi: Fix getting of optional confd gpio

[ Upstream commit dec43da46f63eb71f519d963ba6832838e4262a3 ]

Currently the driver does not handle EPROBE_DEFER for the confd gpio.
Use devm_gpiod_get_optional() instead of devm_gpiod_get() and return
error codes from altera_ps_probe().

Fixes: 5692fae0742d ("fpga manager: Add altera-ps-spi driver for Altera FPGAs")
Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/fpga/altera-ps-spi.c