Input: tegra-kbc - use devm_platform_ioremap_resource
Subsystems (4)
PATCH 1/1 Input: tegra-kbc - use devm_platform_ioremap_resource
devm_platform_get_and_ioremap_resource maps a resource and returns its physical address. If we don't need the physical address, we should call devm_platform_ioremap_resource instead.
--- drivers/input/keyboard/tegra-kbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/keyboard/tegra-kbc.c +1 -1
@@ -640,7 +640,7 @@ static int tegra_kbc_probe(struct platform_device *pdev)timer_setup (&kbc->timer, tegra_kbc_keypress_timer,0 ); - kbc->mmio =devm_platform_get_and_ioremap_resource (pdev,0 ,NULL ); + kbc->mmio =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (kbc->mmio))return PTR_ERR (kbc->mmio);
Signature · 1 line
2.30.2
Quoted 8 lines · Martin Kaiser
devm_platform_get_and_ioremap_resourcemaps a resource and returns its physical address. If we don't need the physical address, we should calldevm_platform_ioremap_resourceinstead.Signed-off-by Martin Kaiser <[email protected]>--- drivers/input/keyboard/tegra-kbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Different variations of these have been going around for a while now. I don't really see much use in these tiny conversions.
But the patch also isn't wrong, so while I'm at it:
Quoted 17 lines
drivers/input/keyboard/tegra-kbc.c +1
-1@@ -640,7 +640,7 @@ static int tegra_kbc_probe(struct platform_device *pdev)timer_setup (&kbc->timer, tegra_kbc_keypress_timer,0 ); - kbc->mmio =devm_platform_get_and_ioremap_resource (pdev,0 ,NULL ); + kbc->mmio =devm_platform_ioremap_resource (pdev,0 );if (IS_ERR (kbc->mmio))return PTR_ERR (kbc->mmio);Signature · 1 line
2.30.2
Quoted 5 lines · Martin Kaiser
devm_platform_get_and_ioremap_resourcemaps a resource and returns its physical address. If we don't need the physical address, we should calldevm_platform_ioremap_resourceinstead.Signed-off-by Martin Kaiser <[email protected]>
Applied, thank you.
Signature · 1 line
Dmitry