Skip to content

Commit acbb7f1

Browse files
committed
drm/imx: parallel-display: 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>
1 parent f433ff4 commit acbb7f1

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/gpu/drm/imx/parallel-display.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ struct imx_parallel_display {
2828
struct drm_bridge bridge;
2929
struct device *dev;
3030
void *edid;
31-
int edid_len;
3231
u32 bus_format;
3332
u32 bus_flags;
3433
struct drm_display_mode mode;
@@ -305,6 +304,7 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
305304
struct device_node *np = dev->of_node;
306305
const u8 *edidp;
307306
struct imx_parallel_display *imxpd;
307+
int edid_len;
308308
int ret;
309309
u32 bus_format = 0;
310310
const char *fmt;
@@ -318,10 +318,9 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
318318
if (ret && ret != -ENODEV)
319319
return ret;
320320

321-
edidp = of_get_property(np, "edid", &imxpd->edid_len);
321+
edidp = of_get_property(np, "edid", &edid_len);
322322
if (edidp)
323-
imxpd->edid = devm_kmemdup(dev, edidp, imxpd->edid_len,
324-
GFP_KERNEL);
323+
imxpd->edid = devm_kmemdup(dev, edidp, edid_len, GFP_KERNEL);
325324

326325
ret = of_property_read_string(np, "interface-pix-fmt", &fmt);
327326
if (!ret) {

0 commit comments

Comments
 (0)