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>
This commit is contained in:
parent
23a6502b07
commit
754e0b5803
|
@ -62,7 +62,6 @@ struct imx_ldb_channel {
|
||||||
struct i2c_adapter *ddc;
|
struct i2c_adapter *ddc;
|
||||||
int chno;
|
int chno;
|
||||||
void *edid;
|
void *edid;
|
||||||
int edid_len;
|
|
||||||
struct drm_display_mode mode;
|
struct drm_display_mode mode;
|
||||||
int mode_valid;
|
int mode_valid;
|
||||||
u32 bus_format;
|
u32 bus_format;
|
||||||
|
@ -536,15 +535,14 @@ static int imx_ldb_panel_ddc(struct device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!channel->ddc) {
|
if (!channel->ddc) {
|
||||||
|
int edid_len;
|
||||||
|
|
||||||
/* if no DDC available, fallback to hardcoded EDID */
|
/* if no DDC available, fallback to hardcoded EDID */
|
||||||
dev_dbg(dev, "no ddc available\n");
|
dev_dbg(dev, "no ddc available\n");
|
||||||
|
|
||||||
edidp = of_get_property(child, "edid",
|
edidp = of_get_property(child, "edid", &edid_len);
|
||||||
&channel->edid_len);
|
|
||||||
if (edidp) {
|
if (edidp) {
|
||||||
channel->edid = kmemdup(edidp,
|
channel->edid = kmemdup(edidp, edid_len, GFP_KERNEL);
|
||||||
channel->edid_len,
|
|
||||||
GFP_KERNEL);
|
|
||||||
} else if (!channel->panel) {
|
} else if (!channel->panel) {
|
||||||
/* fallback to display-timings node */
|
/* fallback to display-timings node */
|
||||||
ret = of_get_drm_display_mode(child,
|
ret = of_get_drm_display_mode(child,
|
||||||
|
|
Loading…
Reference in New Issue