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

authored by

ye xingchen and committed by
Dmitry Torokhov
babc94da 27d5e05b

+1 -3
+1 -3
drivers/input/keyboard/st-keyscan.c
··· 125 125 { 126 126 struct st_keyscan *keypad_data; 127 127 struct input_dev *input_dev; 128 - struct resource *res; 129 128 int error; 130 129 131 130 if (!pdev->dev.of_node) { ··· 168 169 169 170 input_set_drvdata(input_dev, keypad_data); 170 171 171 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 172 - keypad_data->base = devm_ioremap_resource(&pdev->dev, res); 172 + keypad_data->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); 173 173 if (IS_ERR(keypad_data->base)) 174 174 return PTR_ERR(keypad_data->base); 175 175