summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.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_pll.c
parent3da1781ea458f658e6089c1cc471016a72fb81cf (diff)
downloadlinux-f215d6003736c48b894f2d9bf9c26855c2f3918d.tar.bz2
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_pll.c')
-rw-r--r--drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
index a36e92155c5e..c5f89129dcdd 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/hdmi_pll.c
@@ -100,7 +100,6 @@ static int hdmi_pll_enable(struct dss_pll *dsspll)
{
struct hdmi_pll_data *pll = container_of(dsspll, struct hdmi_pll_data, pll);
struct hdmi_wp_data *wp = pll->wp;
- u16 r = 0;
dss_ctrl_pll_enable(DSS_PLL_HDMI, true);
@@ -216,17 +215,10 @@ int hdmi_pll_init(struct platform_device *pdev, struct hdmi_pll_data *pll,
struct hdmi_wp_data *wp)
{
int r;
- struct resource *res;
pll->wp = wp;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pll");
- if (!res) {
- DSSERR("can't get PLL mem resource\n");
- return -EINVAL;
- }
-
- pll->base = devm_ioremap_resource(&pdev->dev, res);
+ pll->base = devm_platform_ioremap_resource_byname(pdev, "pll");
if (IS_ERR(pll->base)) {
DSSERR("can't ioremap PLLCTRL\n");
return PTR_ERR(pll->base);