diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-02 19:30:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-02 19:30:09 +0200 |
commit | 99097a214b0c15f7595ac8f2788662f3941c1992 (patch) | |
tree | 9e496a96ea36ccd9e97509878fadeecd671e28aa /drivers/fpga | |
parent | Merge tag 'lkdtm-next' of https://git.kernel.org/pub/scm/linux/kernel/git/kee... (diff) | |
parent | Linux 5.3-rc7 (diff) | |
download | linux-99097a214b0c15f7595ac8f2788662f3941c1992.tar.xz linux-99097a214b0c15f7595ac8f2788662f3941c1992.zip |
Merge 5.3-rc7 into char-misc-next
We need the fixes in here as well for testing and merges
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga')
-rw-r--r-- | drivers/fpga/altera-ps-spi.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/fpga/altera-ps-spi.c b/drivers/fpga/altera-ps-spi.c index a13f224303c6..0221dee8dd4c 100644 --- a/drivers/fpga/altera-ps-spi.c +++ b/drivers/fpga/altera-ps-spi.c @@ -210,7 +210,7 @@ static int altera_ps_write_complete(struct fpga_manager *mgr, return -EIO; } - if (!IS_ERR(conf->confd)) { + if (conf->confd) { if (!gpiod_get_raw_value_cansleep(conf->confd)) { dev_err(&mgr->dev, "CONF_DONE is inactive!\n"); return -EIO; @@ -289,10 +289,13 @@ static int altera_ps_probe(struct spi_device *spi) return PTR_ERR(conf->status); } - conf->confd = devm_gpiod_get(&spi->dev, "confd", GPIOD_IN); + conf->confd = devm_gpiod_get_optional(&spi->dev, "confd", GPIOD_IN); if (IS_ERR(conf->confd)) { - dev_warn(&spi->dev, "Not using confd gpio: %ld\n", - PTR_ERR(conf->confd)); + dev_err(&spi->dev, "Failed to get confd gpio: %ld\n", + PTR_ERR(conf->confd)); + return PTR_ERR(conf->confd); + } else if (!conf->confd) { + dev_warn(&spi->dev, "Not using confd gpio"); } /* Register manager with unique name */ |