Skip to content

Commit 83ea7df

Browse files
ye xingchendtor
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent babc94d commit 83ea7df

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/input/keyboard/tegra-kbc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,6 @@ MODULE_DEVICE_TABLE(of, tegra_kbc_of_match);
598598
static int tegra_kbc_probe(struct platform_device *pdev)
599599
{
600600
struct tegra_kbc *kbc;
601-
struct resource *res;
602601
int err;
603602
int num_rows = 0;
604603
unsigned int debounce_cnt;
@@ -642,8 +641,7 @@ static int tegra_kbc_probe(struct platform_device *pdev)
642641

643642
timer_setup(&kbc->timer, tegra_kbc_keypress_timer, 0);
644643

645-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
646-
kbc->mmio = devm_ioremap_resource(&pdev->dev, res);
644+
kbc->mmio = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
647645
if (IS_ERR(kbc->mmio))
648646
return PTR_ERR(kbc->mmio);
649647

0 commit comments

Comments
 (0)