Skip to content

Commit 68fda5a

Browse files
Ye XingchenpH5
authored andcommitted
reset: lpc18xx: Use devm_platform_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to Use devm_platform_ioremap_resource(), as this is exactly what this function does. Suggested-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Ye Xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202302161053360618204@zte.com.cn Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent 9bf9276 commit 68fda5a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

drivers/reset/reset-lpc18xx.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,16 +139,14 @@ static const struct reset_control_ops lpc18xx_rgu_ops = {
139139
static int lpc18xx_rgu_probe(struct platform_device *pdev)
140140
{
141141
struct lpc18xx_rgu_data *rc;
142-
struct resource *res;
143142
u32 fcclk, firc;
144143
int ret;
145144

146145
rc = devm_kzalloc(&pdev->dev, sizeof(*rc), GFP_KERNEL);
147146
if (!rc)
148147
return -ENOMEM;
149148

150-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
151-
rc->base = devm_ioremap_resource(&pdev->dev, res);
149+
rc->base = devm_platform_ioremap_resource(pdev, 0);
152150
if (IS_ERR(rc->base))
153151
return PTR_ERR(rc->base);
154152

0 commit comments

Comments
 (0)