Skip to content

Commit

Permalink
drm/rockchip: rk3066_hdmi: Use devm_platform_ioremap_resource() in rk…
Browse files Browse the repository at this point in the history
…3066_hdmi_bind()

Simplify this function implementation by using a known wrapper function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
elfring authored and mmind committed Oct 13, 2019
1 parent 695379b commit 9abdcff
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/gpu/drm/rockchip/rk3066_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,6 @@ static int rk3066_hdmi_bind(struct device *dev, struct device *master,
struct platform_device *pdev = to_platform_device(dev);
struct drm_device *drm = data;
struct rk3066_hdmi *hdmi;
struct resource *iores;
int irq;
int ret;

Expand All @@ -753,12 +752,7 @@ static int rk3066_hdmi_bind(struct device *dev, struct device *master,

hdmi->dev = dev;
hdmi->drm_dev = drm;

iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!iores)
return -ENXIO;

hdmi->regs = devm_ioremap_resource(dev, iores);
hdmi->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(hdmi->regs))
return PTR_ERR(hdmi->regs);

Expand Down

0 comments on commit 9abdcff

Please sign in to comment.