diff options
| author | Etienne Carriere <[email protected]> | 2020-02-03 13:50:47 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2020-02-11 11:36:31 +0000 |
| commit | 8196f7bcc2adf21f83d82691d537fcef7abaa1c7 (patch) | |
| tree | c49bab4db2981be38df64ccfe8e7201fdafb55ec /drivers/spi/spi-stm32-qspi.c | |
| parent | spi: spi-geni-qcom: Grow a dev pointer to simplify code (diff) | |
| download | kernel-8196f7bcc2adf21f83d82691d537fcef7abaa1c7.tar.gz kernel-8196f7bcc2adf21f83d82691d537fcef7abaa1c7.zip | |
spi: stm32-qspi: defer probe for reset controller
Changes stm32 QSPI driver to defer its probe operation when a reset
controller device have not yet probed but is registered in the
system.
Signed-off-by: Etienne Carriere <[email protected]>
Signed-off-by: Patrice Chotard <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/spi/spi-stm32-qspi.c')
| -rw-r--r-- | drivers/spi/spi-stm32-qspi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/spi/spi-stm32-qspi.c b/drivers/spi/spi-stm32-qspi.c index 4ef569b47aa6..13bb64bf4c8f 100644 --- a/drivers/spi/spi-stm32-qspi.c +++ b/drivers/spi/spi-stm32-qspi.c @@ -615,7 +615,11 @@ static int stm32_qspi_probe(struct platform_device *pdev) } rstc = devm_reset_control_get_exclusive(dev, NULL); - if (!IS_ERR(rstc)) { + if (IS_ERR(rstc)) { + ret = PTR_ERR(rstc); + if (ret == -EPROBE_DEFER) + goto err; + } else { reset_control_assert(rstc); udelay(2); reset_control_deassert(rstc); |
