2020-04-27 06:44:00

by Lionel Debieve

[permalink] [raw]
Subject: [PATCH 0/3] crypto: stm32/hash: Defer probe management

These patches manage properly the defer probe for STM32 Hash driver.
It allows the driver to be probed later if clock, reset or dma return
a defer error.
It also removes the error print messages in such cases.

Etienne Carriere (2):
crypto: stm32/hash - defer probe for reset controller
crypto: stm32/hash - defer probe for dma device

Lionel Debieve (1):
crypto: stm32/hash - don't print error on probe deferral

drivers/crypto/stm32/stm32-hash.c | 38 ++++++++++++++++++++++---------
1 file changed, 27 insertions(+), 11 deletions(-)

--
2.17.1


2020-04-27 06:45:25

by Lionel Debieve

[permalink] [raw]
Subject: [PATCH 3/3] crypto: stm32/hash - don't print error on probe deferral

Change driver to not print an error message when the device
probe is deferred for a clock resource.

Signed-off-by: Lionel Debieve <[email protected]>
---
drivers/crypto/stm32/stm32-hash.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/stm32/stm32-hash.c b/drivers/crypto/stm32/stm32-hash.c
index 0d592f55a271..03c5e6683805 100644
--- a/drivers/crypto/stm32/stm32-hash.c
+++ b/drivers/crypto/stm32/stm32-hash.c
@@ -1464,8 +1464,11 @@ static int stm32_hash_probe(struct platform_device *pdev)

hdev->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(hdev->clk)) {
- dev_err(dev, "failed to get clock for hash (%lu)\n",
- PTR_ERR(hdev->clk));
+ if (PTR_ERR(hdev->clk) != -EPROBE_DEFER) {
+ dev_err(dev, "failed to get clock for hash (%lu)\n",
+ PTR_ERR(hdev->clk));
+ }
+
return PTR_ERR(hdev->clk);
}

--
2.17.1

2020-05-08 06:05:10

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 0/3] crypto: stm32/hash: Defer probe management

On Mon, Apr 27, 2020 at 08:42:23AM +0200, Lionel Debieve wrote:
> These patches manage properly the defer probe for STM32 Hash driver.
> It allows the driver to be probed later if clock, reset or dma return
> a defer error.
> It also removes the error print messages in such cases.
>
> Etienne Carriere (2):
> crypto: stm32/hash - defer probe for reset controller
> crypto: stm32/hash - defer probe for dma device
>
> Lionel Debieve (1):
> crypto: stm32/hash - don't print error on probe deferral
>
> drivers/crypto/stm32/stm32-hash.c | 38 ++++++++++++++++++++++---------
> 1 file changed, 27 insertions(+), 11 deletions(-)

All applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt