diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2020-09-11 14:38:55 +0200 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2020-10-27 10:20:36 +0100 |
commit | acbb7f1436624819f728742f781c7d5f10ba267d (patch) | |
tree | 5006e2212492243a1efcc8d3271358a21ea95a7d /drivers/gpu/drm/imx/parallel-display.c | |
parent | drm/imx: parallel-display: remove unused function enc_to_imxpd() (diff) | |
download | linux-acbb7f1436624819f728742f781c7d5f10ba267d.tar.xz linux-acbb7f1436624819f728742f781c7d5f10ba267d.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/imx/parallel-display.c')
-rw-r--r-- | drivers/gpu/drm/imx/parallel-display.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c index 726f6cc6fa25..2eb8df4697df 100644 --- a/drivers/gpu/drm/imx/parallel-display.c +++ b/drivers/gpu/drm/imx/parallel-display.c @@ -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; @@ -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; @@ -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) { |