Skip to content

Commit 9474458

Browse files
Chunfeng Yunvinodkoul
authored andcommitted
phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource to simplify code Acked-by: Chun-Kuang Hu <[email protected]> Signed-off-by: Chunfeng Yun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 5f71b1e commit 9474458

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/phy/mediatek/phy-mtk-hdmi.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
100100
{
101101
struct device *dev = &pdev->dev;
102102
struct mtk_hdmi_phy *hdmi_phy;
103-
struct resource *mem;
104103
struct clk *ref_clk;
105104
const char *ref_clk_name;
106105
struct clk_init_data clk_init = {
@@ -116,11 +115,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev)
116115
if (!hdmi_phy)
117116
return -ENOMEM;
118117

119-
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
120-
hdmi_phy->regs = devm_ioremap_resource(dev, mem);
121-
if (IS_ERR(hdmi_phy->regs)) {
118+
hdmi_phy->regs = devm_platform_ioremap_resource(pdev, 0);
119+
if (IS_ERR(hdmi_phy->regs))
122120
return PTR_ERR(hdmi_phy->regs);
123-
}
124121

125122
ref_clk = devm_clk_get(dev, "pll_ref");
126123
if (IS_ERR(ref_clk)) {

0 commit comments

Comments
 (0)