[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOMZO5C2syuzyGcpjVOvSvDghaA-ifc8oL-pqhivP49wBf=GSw@mail.gmail.com>
Date: Tue, 25 Jun 2019 11:06:00 -0300
From: Fabio Estevam <festevam@...il.com>
To: Robert Chiras <robert.chiras@....com>
Cc: Thierry Reding <thierry.reding@...il.com>,
Sam Ravnborg <sam@...nborg.org>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
DRI mailing list <dri-devel@...ts.freedesktop.org>,
NXP Linux Team <linux-imx@....com>
Subject: Re: [PATCH v4 2/2] drm/panel: Add support for Raydium RM67191 panel driver
Hi Robert,
On Tue, Jun 25, 2019 at 4:28 AM Robert Chiras <robert.chiras@....com> wrote:
> +static int rad_bl_get_brightness(struct backlight_device *bl)
> +{
> + struct mipi_dsi_device *dsi = bl_get_data(bl);
> + struct rad_panel *rad = mipi_dsi_get_drvdata(dsi);
> + struct device *dev = &dsi->dev;
> + u16 brightness;
> + int ret;
> +
> + if (!rad->prepared)
> + return 0;
> +
> + DRM_DEV_DEBUG_DRIVER(dev, "\n");
Please remove this debug line.
> + if (!rad->prepared)
> + return 0;
> +
> + DRM_DEV_DEBUG_DRIVER(dev, "New brightness: %d\n", bl->props.brightness);
Please remove it.
> + ret = of_property_read_u32(np, "dsi-lanes", &dsi->lanes);
> + if (ret) {
> + dev_err(dev, "Failed to get dsi-lanes property (%d)\n", ret);
> + return ret;
> + }
> +
> + panel->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
Even it is optional, you still need to check for error and propagate
it in the case of error.
Otherwise defer probe will not work.
> + ret = drm_panel_add(&panel->panel);
> + if (ret)
> + return ret;
> +
> +
One blank line is enough.
Powered by blists - more mailing lists