Commit 719216eb authored by Samuel Holland's avatar Samuel Holland Committed by Maxime Ripard

drm/sun4i: sun8i-hdmi-phy: Use devm_platform_ioremap_resource

The struct resource is not used for anything else, so we can simplify
the code a bit by using the helper function.
Signed-off-by: default avatarSamuel Holland <samuel@sholland.org>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220615045543.62813-3-samuel@sholland.org
parent 1a395a56
...@@ -675,7 +675,6 @@ static int sun8i_hdmi_phy_probe(struct platform_device *pdev) ...@@ -675,7 +675,6 @@ static int sun8i_hdmi_phy_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct device_node *node = dev->of_node; struct device_node *node = dev->of_node;
struct sun8i_hdmi_phy *phy; struct sun8i_hdmi_phy *phy;
struct resource res;
void __iomem *regs; void __iomem *regs;
int ret; int ret;
...@@ -686,13 +685,7 @@ static int sun8i_hdmi_phy_probe(struct platform_device *pdev) ...@@ -686,13 +685,7 @@ static int sun8i_hdmi_phy_probe(struct platform_device *pdev)
phy->variant = of_device_get_match_data(dev); phy->variant = of_device_get_match_data(dev);
phy->dev = dev; phy->dev = dev;
ret = of_address_to_resource(node, 0, &res); regs = devm_platform_ioremap_resource(pdev, 0);
if (ret) {
dev_err(dev, "phy: Couldn't get our resources\n");
return ret;
}
regs = devm_ioremap_resource(dev, &res);
if (IS_ERR(regs)) { if (IS_ERR(regs)) {
dev_err(dev, "Couldn't map the HDMI PHY registers\n"); dev_err(dev, "Couldn't map the HDMI PHY registers\n");
return PTR_ERR(regs); return PTR_ERR(regs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment