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

authored by

ye xingchen and committed by
Dmitry Torokhov
27d5e05b 492ec555

+1 -3
+1 -3
drivers/input/keyboard/spear-keyboard.c
··· 186 186 const struct matrix_keymap_data *keymap = pdata ? pdata->keymap : NULL; 187 187 struct spear_kbd *kbd; 188 188 struct input_dev *input_dev; 189 - struct resource *res; 190 189 int irq; 191 190 int error; 192 191 ··· 218 219 kbd->suspended_rate = pdata->suspended_rate; 219 220 } 220 221 221 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 222 - kbd->io_base = devm_ioremap_resource(&pdev->dev, res); 222 + kbd->io_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); 223 223 if (IS_ERR(kbd->io_base)) 224 224 return PTR_ERR(kbd->io_base); 225 225