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

authored by

ye xingchen and committed by
Dmitry Torokhov
83ea7df6 babc94da

+1 -3
+1 -3
drivers/input/keyboard/tegra-kbc.c
··· 598 598 static int tegra_kbc_probe(struct platform_device *pdev) 599 599 { 600 600 struct tegra_kbc *kbc; 601 - struct resource *res; 602 601 int err; 603 602 int num_rows = 0; 604 603 unsigned int debounce_cnt; ··· 641 642 642 643 timer_setup(&kbc->timer, tegra_kbc_keypress_timer, 0); 643 644 644 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 645 - kbc->mmio = devm_ioremap_resource(&pdev->dev, res); 645 + kbc->mmio = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); 646 646 if (IS_ERR(kbc->mmio)) 647 647 return PTR_ERR(kbc->mmio); 648 648