summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
diff options
context:
space:
mode:
authorQilong Zhang <zhangqilong3@huawei.com>2020-09-16 19:13:53 +0800
committerSam Ravnborg <sam@ravnborg.org>2020-10-16 23:55:27 +0200
commitf215d6003736c48b894f2d9bf9c26855c2f3918d (patch)
treed404c7b54000b3bc10d1e826dcb46f2690d14b2d /drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
parent3da1781ea458f658e6089c1cc471016a72fb81cf (diff)
omapfb: use devm_platform_ioremap_resource_byname
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately. Signed-off-by: Qilong Zhang <zhangqilong3@huawei.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> [fixed warning - unused variable] [fixed checkpatch warning - fixed indent] Link: https://patchwork.freedesktop.org/patch/msgid/20200916111353.105914-1-zhangqilong3@huawei.com
Diffstat (limited to 'drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c')
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
index 9c645adba9e2..6fbfeb01b315 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_phy.c
@@ -207,19 +207,11 @@ static const struct hdmi_phy_features *hdmi_phy_get_features(void)
int hdmi_phy_init(struct platform_device *pdev, struct hdmi_phy_data *phy)
{
- struct resource *res;
-
phy_feat = hdmi_phy_get_features();
if (!phy_feat)
return -ENODEV;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy");
- if (!res) {
- DSSERR("can't get PHY mem resource\n");
- return -EINVAL;
- }
-
- phy->base = devm_ioremap_resource(&pdev->dev, res);
+ phy->base = devm_platform_ioremap_resource_byname(pdev, "phy");
if (IS_ERR(phy->base)) {
DSSERR("can't ioremap TX PHY\n");
return PTR_ERR(phy->base);