Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202301281606309671328@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

ye xingchen and committed by
Dmitry Torokhov
24b915d1 12b11142

+1 -3
+1 -3
drivers/input/serio/arc_ps2.c
··· 182 182 static int arc_ps2_probe(struct platform_device *pdev) 183 183 { 184 184 struct arc_ps2_data *arc_ps2; 185 - struct resource *res; 186 185 int irq; 187 186 int error, id, i; 188 187 ··· 196 197 return -ENOMEM; 197 198 } 198 199 199 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 200 - arc_ps2->addr = devm_ioremap_resource(&pdev->dev, res); 200 + arc_ps2->addr = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); 201 201 if (IS_ERR(arc_ps2->addr)) 202 202 return PTR_ERR(arc_ps2->addr); 203 203