i2c: bcm2835: Don't complain on -EPROBE_DEFER from getting our clock
Subsystems (3)
PATCH 1/1 i2c: bcm2835: Don't complain on -EPROBE_DEFER from getting our clock
Fixes dmesg spam when we just need to wait a moment for the clock driver to probe.
--- drivers/i2c/busses/i2c-bcm2835.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-bcm2835.c +2 -1
@@ -253,7 +253,8 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) i2c_dev->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (i2c_dev->clk)) { -dev_err (&pdev->dev,"Could not get clock\n" ); +if (PTR_ERR (i2c_dev->clk) != -EPROBE_DEFER ) +dev_err (&pdev->dev,"Could not get clock\n" );return PTR_ERR (i2c_dev->clk); }
Signature · 1 line
2.7.0
Hi Eric,
Quoted 17 lines
Eric Anholt <[email protected]> hat am 19. Februar 2016 um 02:12 geschrieben:
Fixes dmesg spam when we just need to wait a moment for the clock driver to probe.
Signed-off-by Eric Anholt <[email protected]>---
drivers/i2c/busses/i2c-bcm2835.c| 3 ++-1 file changed, 2 insertions(+), 1 deletion(-)drivers/i2c/busses/i2c-bcm2835.c +0
-0
drivers/i2c/busses/i2c-bcm2835.c static int bcm2835_i2c_probe(struct platform_device *pdev) · line 257
Quoted 6 lines
drivers/i2c/busses/i2c-bcm2835.c +2
-1@@ -253,7 +253,8 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) i2c_dev->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (i2c_dev->clk)) { -dev_err (&pdev->dev,"Could not get clock\n" ); +if (PTR_ERR (i2c_dev->clk) != -EPROBE_DEFER ) +dev_err (&pdev->dev,"Could not get clock\n" );
i know it's something different, but how about printing the error code here?
Regards
Stefan
Quoted 11 lines
drivers/i2c/busses/i2c-bcm2835.c +0
-1return PTR_ERR (i2c_dev->clk); } --2.7.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Wolfram Sang
AppliedQuoted 4 lines · Eric Anholt
Fixes dmesg spam when we just need to wait a moment for the clock driver to probe.
Signed-off-by Eric Anholt <[email protected]>
Applied to for-next, thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160722/ce71074e/attachment.sig>