[PATCH v4 2/2] drm/panel: Add support for Raydium RM67191 panel driver
Fabio Estevam
festevam at gmail.com
Tue Jun 25 14:06:00 UTC 2019
Hi Robert,
On Tue, Jun 25, 2019 at 4:28 AM Robert Chiras <robert.chiras at nxp.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.
More information about the dri-devel
mailing list