Message ID | 20220206190702.450643-1-david@ixit.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/panel: JDI LT070ME05000 remove useless warning | expand |
Hi David, On Sun, Feb 06, 2022 at 08:07:02PM +0100, David Heidelberg wrote: > Do as most of panel and in case of deffered probe, don't print error. > > Fixes warning: > panel-jdi-lt070me05000 4700000.dsi.0: cannot get enable-gpio -517 > > Signed-off-by: David Heidelberg <david@ixit.cz> > --- > drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c > index ea0e7221e706..b5c0b51dc146 100644 > --- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c > +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c > @@ -408,7 +408,8 @@ static int jdi_panel_add(struct jdi_panel *jdi) > jdi->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); > if (IS_ERR(jdi->enable_gpio)) { > ret = PTR_ERR(jdi->enable_gpio); > - dev_err(dev, "cannot get enable-gpio %d\n", ret); > + if (ret != -EPROBE_DEFER) > + dev_err(dev, "cannot get enable-gpio %d\n", ret); > return ret; > } Thanks for submitting a fix for this. Please look into the use of dev_err_probe() for this as this is the preferred way to fix it now. Sam
On Sun, Feb 6 2022 at 20:26:50 +0100, Sam Ravnborg <sam@ravnborg.org>
wrote:
> dev_err_probe
Amazing, thanks I'll send fix right away.
Davi
diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c index ea0e7221e706..b5c0b51dc146 100644 --- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c @@ -408,7 +408,8 @@ static int jdi_panel_add(struct jdi_panel *jdi) jdi->enable_gpio = devm_gpiod_get(dev, "enable", GPIOD_OUT_LOW); if (IS_ERR(jdi->enable_gpio)) { ret = PTR_ERR(jdi->enable_gpio); - dev_err(dev, "cannot get enable-gpio %d\n", ret); + if (ret != -EPROBE_DEFER) + dev_err(dev, "cannot get enable-gpio %d\n", ret); return ret; }
Do as most of panel and in case of deffered probe, don't print error. Fixes warning: panel-jdi-lt070me05000 4700000.dsi.0: cannot get enable-gpio -517 Signed-off-by: David Heidelberg <david@ixit.cz> --- drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)