Skip to content

Commit

Permalink
drm/imx: parallel-display: reduce scope of edid_len
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Philipp Zabel committed Oct 27, 2020
1 parent f433ff4 commit acbb7f1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/gpu/drm/imx/parallel-display.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ struct imx_parallel_display {
struct drm_bridge bridge;
struct device *dev;
void *edid;
int edid_len;
u32 bus_format;
u32 bus_flags;
struct drm_display_mode mode;
Expand Down Expand Up @@ -305,6 +304,7 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
struct device_node *np = dev->of_node;
const u8 *edidp;
struct imx_parallel_display *imxpd;
int edid_len;
int ret;
u32 bus_format = 0;
const char *fmt;
Expand All @@ -318,10 +318,9 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data)
if (ret && ret != -ENODEV)
return ret;

edidp = of_get_property(np, "edid", &imxpd->edid_len);
edidp = of_get_property(np, "edid", &edid_len);
if (edidp)
imxpd->edid = devm_kmemdup(dev, edidp, imxpd->edid_len,
GFP_KERNEL);
imxpd->edid = devm_kmemdup(dev, edidp, edid_len, GFP_KERNEL);

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

0 comments on commit acbb7f1

Please sign in to comment.