* [PATCH] spi: spl022: Probe defer is no error
@ 2023-06-02 11:11 Mårten Lindahl
2023-06-02 11:44 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Mårten Lindahl @ 2023-06-02 11:11 UTC (permalink / raw)
To: Linus Walleij, Mark Brown
Cc: linux-arm-kernel, linux-spi, linux-kernel, kernel, Mårten Lindahl
When the spi controller is registered and the cs_gpiods cannot be
assigned, causing a defer of the probe, there is an error print saying:
"probe - problem registering spi master"
This should not be announced as an error. Print this message for all
errors except for the probe defer.
Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
---
drivers/spi/spi-pl022.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 982407bc5d9f..520471dfeb11 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2217,8 +2217,9 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)
amba_set_drvdata(adev, pl022);
status = devm_spi_register_master(&adev->dev, master);
if (status != 0) {
- dev_err(&adev->dev,
- "probe - problem registering spi master\n");
+ if (status != -EPROBE_DEFER)
+ dev_err(&adev->dev,
+ "probe - problem registering spi master\n");
goto err_spi_register;
}
dev_dbg(dev, "probe succeeded\n");
---
base-commit: 7877cb91f1081754a1487c144d85dc0d2e2e7fc4
change-id: 20230602-pl022-defer-fix-0f8b8c0b6eff
Best regards,
--
Mårten Lindahl <marten.lindahl@axis.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: spl022: Probe defer is no error
2023-06-02 11:11 [PATCH] spi: spl022: Probe defer is no error Mårten Lindahl
@ 2023-06-02 11:44 ` Mark Brown
2023-06-02 11:54 ` Mårten Lindahl
0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2023-06-02 11:44 UTC (permalink / raw)
To: Mårten Lindahl
Cc: Linus Walleij, linux-arm-kernel, linux-spi, linux-kernel, kernel
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
On Fri, Jun 02, 2023 at 01:11:51PM +0200, Mårten Lindahl wrote:
> if (status != 0) {
> - dev_err(&adev->dev,
> - "probe - problem registering spi master\n");
> + if (status != -EPROBE_DEFER)
> + dev_err(&adev->dev,
> + "probe - problem registering spi master\n");
dev_err_probe().
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] spi: spl022: Probe defer is no error
2023-06-02 11:44 ` Mark Brown
@ 2023-06-02 11:54 ` Mårten Lindahl
0 siblings, 0 replies; 3+ messages in thread
From: Mårten Lindahl @ 2023-06-02 11:54 UTC (permalink / raw)
To: Mark Brown, Mårten Lindahl
Cc: Linus Walleij, linux-arm-kernel, linux-spi, linux-kernel, kernel
On 6/2/23 13:44, Mark Brown wrote:
> On Fri, Jun 02, 2023 at 01:11:51PM +0200, Mårten Lindahl wrote:
>
>> if (status != 0) {
>> - dev_err(&adev->dev,
>> - "probe - problem registering spi master\n");
>> + if (status != -EPROBE_DEFER)
>> + dev_err(&adev->dev,
>> + "probe - problem registering spi master\n");
> dev_err_probe().
Hi Mark!
Yes, that's even better. Thanks!
Kind regards
Mårten
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-02 11:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02 11:11 [PATCH] spi: spl022: Probe defer is no error Mårten Lindahl
2023-06-02 11:44 ` Mark Brown
2023-06-02 11:54 ` Mårten Lindahl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).