spi: bcm2835: don't print error on clk_get() DEFER
Subsystems (3)
PATCH 1/1 spi: bcm2835: don't print error on clk_get() DEFER
Otherwise one may get multiple error messages for normal operation of a clock provider.
--- drivers/spi/spi-bcm2835.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/spi-bcm2835.c +2 -1
@@ -1305,7 +1305,8 @@ static int bcm2835_spi_probe(struct platform_device *pdev) bs->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (bs->clk)) { err =PTR_ERR (bs->clk); -dev_err (&pdev->dev,"could not get clk: %d\n" , err); +if (err != -EPROBE_DEFER ) +dev_err (&pdev->dev,"could not get clk: %d\n" , err); goto out_controller_put; }
Signature · 1 line
2.17.1
Quoted 4 lines · Jim Quinlan
Otherwise one may get multiple error messages for normal operation of a clock provider.
Signed-off-by Jim Quinlan <[email protected]>
Signature · 1 line
Florian
Quoted 5 lines · Jim Quinlan
Otherwise one may get multiple error messages for normal operation of a clock provider.
Signed-off-by Jim Quinlan <[email protected]>---
Mark Brown
maintainerdrivers/spi/spi-bcm2835.c static int bcm2835_spi_probe(struct platform_device *pdev) · line 1309
Quoted 8 lines · Jim Quinlan
Otherwise one may get multiple error messages for normal operation of a clock provider.
drivers/spi/spi-bcm2835.c +2
-1if (IS_ERR (bs->clk)) { err =PTR_ERR (bs->clk); -dev_err (&pdev->dev,"could not get clk: %d\n" , err); +if (err != -EPROBE_DEFER ) +dev_err (&pdev->dev,"could not get clk: %d\n" , err);
On the other hand if the clock isn't there and never appears then there won't be anything saying why the driver isn't loading which won't be helpful when trying to figure out what's going on.
Quoted 11 lines · Mark Brown
drivers/spi/spi-bcm2835.c static int bcm2835_spi_probe(struct platform_device *pdev) · line 1309
Quoted 8 lines · Jim Quinlan
Otherwise one may get multiple error messages for normal operation of a clock provider.
if (IS_ERR(bs->clk)) { err = PTR_ERR(bs->clk);drivers/spi/spi-bcm2835.c +2
-1-dev_err (&pdev->dev,"could not get clk: %d\n" , err); +if (err != -EPROBE_DEFER ) +dev_err (&pdev->dev,"could not get clk: %d\n" , err);
Quoted 3 lines
On the other hand if the clock isn't there and never appears then there won't be anything saying why the driver isn't loading which won't be helpful when trying to figure out what's going on.
Understood; I could do a dev_dbg() on -EPROBE_DEFER and dev_err() on all other errors -- would that work for you?
Mark Brown
maintainerQuoted 2 lines · Jim Quinlan
Understood; I could do a
dev_dbg()on -EPROBE_DEFER anddev_err()on all other errors -- would that work for you?
Yes, that sounds good.