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: altera_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/202301281603290601283@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

ye xingchen and committed by
Dmitry Torokhov
6cb86b0a fa9f4275

+1 -3
+1 -3
drivers/input/serio/altera_ps2.c
··· 78 78 static int altera_ps2_probe(struct platform_device *pdev) 79 79 { 80 80 struct ps2if *ps2if; 81 - struct resource *res; 82 81 struct serio *serio; 83 82 int error, irq; 84 83 ··· 85 86 if (!ps2if) 86 87 return -ENOMEM; 87 88 88 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 89 - ps2if->base = devm_ioremap_resource(&pdev->dev, res); 89 + ps2if->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); 90 90 if (IS_ERR(ps2if->base)) 91 91 return PTR_ERR(ps2if->base); 92 92