Message ID | 20170523160503.16920-1-jbrunet@baylibre.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Am 23.05.2017 um 18:05 schrieb Jerome Brunet: > In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we > shouldn't print an error message. Just be silent in this case. > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Those messages are indeed irritating. Thanks, Andreas
On Tue, May 23, 2017 at 06:05:03PM +0200, Jerome Brunet wrote: > In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we > shouldn't print an error message. Just be silent in this case. > > Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> > --- > drivers/pwm/core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Applied, thanks. Thierry
diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index a0860b30bd93..1581f6ab1b1f 100644 --- a/drivers/pwm/core.c +++ b/drivers/pwm/core.c @@ -678,7 +678,9 @@ struct pwm_device *of_pwm_get(struct device_node *np, const char *con_id) pc = of_node_to_pwmchip(args.np); if (IS_ERR(pc)) { - pr_err("%s(): PWM chip not found\n", __func__); + if (PTR_ERR(pc) != -EPROBE_DEFER) + pr_err("%s(): PWM chip not found\n", __func__); + pwm = ERR_CAST(pc); goto put; }
In of_pwm_chip, if we fail to get the pwm chip due to probe defer, we shouldn't print an error message. Just be silent in this case. Signed-off-by: Jerome Brunet <jbrunet@baylibre.com> --- drivers/pwm/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)