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

authored by

ye xingchen and committed by
Dmitry Torokhov
12b11142 6cb86b0a

+1 -3
+1 -3
drivers/input/serio/apbps2.c
··· 132 132 struct apbps2_priv *priv; 133 133 int irq, err; 134 134 u32 freq_hz; 135 - struct resource *res; 136 135 137 136 priv = devm_kzalloc(&ofdev->dev, sizeof(*priv), GFP_KERNEL); 138 137 if (!priv) { ··· 140 141 } 141 142 142 143 /* Find Device Address */ 143 - res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); 144 - priv->regs = devm_ioremap_resource(&ofdev->dev, res); 144 + priv->regs = devm_platform_get_and_ioremap_resource(ofdev, 0, NULL); 145 145 if (IS_ERR(priv->regs)) 146 146 return PTR_ERR(priv->regs); 147 147