diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2020-07-15 10:18:10 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2020-10-27 10:20:36 +0100 |
commit | 754e0b5803e4d915a6f6d8a4154491564c5ea17c (patch) | |
tree | 8a7782d0a032857a43b540f5ece5b3dece5e6596 /drivers/gpu/drm/imx | |
parent | 23a6502b076ba31d36467ddfa50d449bc62db231 (diff) | |
download | linux-754e0b5803e4d915a6f6d8a4154491564c5ea17c.tar.bz2 |
drm/imx: imx-ldb: reduce scope of edid_len
The edid_len variable is never used again. Use a local variable instead
of storing it in the device structure.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/imx')
-rw-r--r-- | drivers/gpu/drm/imx/imx-ldb.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c index af757d1e21fe..41e2978cb1eb 100644 --- a/drivers/gpu/drm/imx/imx-ldb.c +++ b/drivers/gpu/drm/imx/imx-ldb.c @@ -62,7 +62,6 @@ struct imx_ldb_channel { struct i2c_adapter *ddc; int chno; void *edid; - int edid_len; struct drm_display_mode mode; int mode_valid; u32 bus_format; @@ -536,15 +535,14 @@ static int imx_ldb_panel_ddc(struct device *dev, } if (!channel->ddc) { + int edid_len; + /* if no DDC available, fallback to hardcoded EDID */ dev_dbg(dev, "no ddc available\n"); - edidp = of_get_property(child, "edid", - &channel->edid_len); + edidp = of_get_property(child, "edid", &edid_len); if (edidp) { - channel->edid = kmemdup(edidp, - channel->edid_len, - GFP_KERNEL); + channel->edid = kmemdup(edidp, edid_len, GFP_KERNEL); } else if (!channel->panel) { /* fallback to display-timings node */ ret = of_get_drm_display_mode(child, |