Skip to content

Commit

Permalink
drm/panel: panel-dsi-cm: remove extra 'if'
Browse files Browse the repository at this point in the history
We have a useless 'if' in the dsicm_bl_update_status(), a left over from
the conversion to DRM model. Drop the if.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
tomba authored and intel-lab-lkp committed Nov 24, 2020
1 parent 282c768 commit 09d304d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/gpu/drm/panel/panel-dsi-cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static int dsicm_set_update_window(struct panel_drv_data *ddata)
static int dsicm_bl_update_status(struct backlight_device *dev)
{
struct panel_drv_data *ddata = dev_get_drvdata(&dev->dev);
int r = 0;
int r;
int level;

if (dev->props.fb_blank == FB_BLANK_UNBLANK &&
Expand All @@ -207,11 +207,9 @@ static int dsicm_bl_update_status(struct backlight_device *dev)

mutex_lock(&ddata->lock);

if (ddata->enabled) {
if (!r)
r = dsicm_dcs_write_1(
ddata, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, level);
}
if (ddata->enabled)
r = dsicm_dcs_write_1(ddata, MIPI_DCS_SET_DISPLAY_BRIGHTNESS,
level);

mutex_unlock(&ddata->lock);

Expand Down

0 comments on commit 09d304d

Please sign in to comment.