Skip to content

Commit 7508d1e

Browse files
Chunfeng Yunvinodkoul
authored andcommitted
phy: phy-mtk-mipi-dsi: 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 75203e7 commit 7508d1e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/phy/mediatek/phy-mtk-mipi-dsi.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev)
130130
{
131131
struct device *dev = &pdev->dev;
132132
struct mtk_mipi_tx *mipi_tx;
133-
struct resource *mem;
134133
const char *ref_clk_name;
135134
struct clk *ref_clk;
136135
struct clk_init_data clk_init = {
@@ -148,11 +147,9 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev)
148147

149148
mipi_tx->driver_data = of_device_get_match_data(dev);
150149

151-
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
152-
mipi_tx->regs = devm_ioremap_resource(dev, mem);
153-
if (IS_ERR(mipi_tx->regs)) {
150+
mipi_tx->regs = devm_platform_ioremap_resource(pdev, 0);
151+
if (IS_ERR(mipi_tx->regs))
154152
return PTR_ERR(mipi_tx->regs);
155-
}
156153

157154
ref_clk = devm_clk_get(dev, NULL);
158155
if (IS_ERR(ref_clk)) {

0 commit comments

Comments
 (0)