Skip to contentSkip to conversation

i2c: bcm2835: Don't complain on -EPROBE_DEFER from getting our clock

PATCH Applied Eric Anholt 3 participants 3 messages Feb 19, 2016 – Jul 22, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index 818b051..d4f3239 100644
@@ -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
#1 lore raw

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.

---
drivers/i2c/busses/i2c-bcm2835.c | 3 ++-

1 file changed, 2 insertions(+), 1 deletion(-)
drivers/i2c/busses/i2c-bcm2835.c +0 -0
index 818b051..d4f3239 100644

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 -1
 return 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

Applied
#2 lore raw
In reply to Eric Anholt
Quoted 4 lines · Eric Anholt

Fixes dmesg spam when we just need to wait a moment for the clock driver to probe.

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>