OSDN Git Service

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)
committerMoritz Fischer <mdf@kernel.org>
Mon, 19 Aug 2019 00:40:02 +0000 (17:40 -0700)
commitdec43da46f63eb71f519d963ba6832838e4262a3
treee97d9831cd1fd74724bb264b2af2af454a02587c
parent5f9e832c137075045d15cd6899ab0505cfb2ca4b
fpga: altera-ps-spi: Fix getting of optional confd gpio

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>
drivers/fpga/altera-ps-spi.c