Skip to content

Commit 94945b2

Browse files
bbkzzabelvesa
authored andcommitted
clk: imx: clk-imx8qxp-lpcg: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abel Vesa <[email protected]>
1 parent 2deed4c commit 94945b2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/imx/clk-imx8qxp-lpcg.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ static int imx_lpcg_parse_clks_from_dt(struct platform_device *pdev,
183183
unsigned int bit_offset[IMX_LPCG_MAX_CLKS];
184184
struct clk_hw_onecell_data *clk_data;
185185
struct clk_hw **clk_hws;
186-
struct resource *res;
187186
void __iomem *base;
188187
int count;
189188
int idx;
@@ -193,8 +192,7 @@ static int imx_lpcg_parse_clks_from_dt(struct platform_device *pdev,
193192
if (!of_device_is_compatible(np, "fsl,imx8qxp-lpcg"))
194193
return -EINVAL;
195194

196-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
197-
base = devm_ioremap_resource(&pdev->dev, res);
195+
base = devm_platform_ioremap_resource(pdev, 0);
198196
if (IS_ERR(base))
199197
return PTR_ERR(base);
200198

0 commit comments

Comments
 (0)