Skip to content

Commit 24b915d

Browse files
ye xingchendtor
authored andcommitted
Input: arc_ps2 - use devm_platform_get_and_ioremap_resource()
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: ye xingchen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 12b1114 commit 24b915d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/input/serio/arc_ps2.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ static int arc_ps2_create_port(struct platform_device *pdev,
182182
static int arc_ps2_probe(struct platform_device *pdev)
183183
{
184184
struct arc_ps2_data *arc_ps2;
185-
struct resource *res;
186185
int irq;
187186
int error, id, i;
188187

@@ -197,8 +196,7 @@ static int arc_ps2_probe(struct platform_device *pdev)
197196
return -ENOMEM;
198197
}
199198

200-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
201-
arc_ps2->addr = devm_ioremap_resource(&pdev->dev, res);
199+
arc_ps2->addr = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
202200
if (IS_ERR(arc_ps2->addr))
203201
return PTR_ERR(arc_ps2->addr);
204202

0 commit comments

Comments
 (0)