diff mbox series

[07/10] Input: sun4i-lradc-keys - Convert to devm_platform_ioremap_resource()

Message ID 20230705052346.39337-7-frank.li@vivo.com (mailing list archive)
State Mainlined
Commit b1c5590045a08751f3d523b2343e848365e6b046
Headers show
Series [01/10] Input: bcm-keypad - Convert to devm_platform_ioremap_resource() | expand

Commit Message

Yangtao Li July 5, 2023, 5:23 a.m. UTC
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/input/keyboard/sun4i-lradc-keys.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jernej Škrabec July 11, 2023, 6:27 p.m. UTC | #1
Dne sreda, 05. julij 2023 ob 07:23:43 CEST je Yangtao Li napisal(a):
> Use devm_platform_ioremap_resource() to simplify code.
> 
> Signed-off-by: Yangtao Li <frank.li@vivo.com>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

> ---
>  drivers/input/keyboard/sun4i-lradc-keys.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c
> b/drivers/input/keyboard/sun4i-lradc-keys.c index
> 15c15c0958b0..95d927cc8b7e 100644
> --- a/drivers/input/keyboard/sun4i-lradc-keys.c
> +++ b/drivers/input/keyboard/sun4i-lradc-keys.c
> @@ -307,8 +307,7 @@ static int sun4i_lradc_probe(struct platform_device
> *pdev)
> 
>  	input_set_drvdata(lradc->input, lradc);
> 
> -	lradc->base = devm_ioremap_resource(dev,
> -			      platform_get_resource(pdev, 
IORESOURCE_MEM, 0));
> +	lradc->base = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(lradc->base))
>  		return PTR_ERR(lradc->base);
diff mbox series

Patch

diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c
index 15c15c0958b0..95d927cc8b7e 100644
--- a/drivers/input/keyboard/sun4i-lradc-keys.c
+++ b/drivers/input/keyboard/sun4i-lradc-keys.c
@@ -307,8 +307,7 @@  static int sun4i_lradc_probe(struct platform_device *pdev)
 
 	input_set_drvdata(lradc->input, lradc);
 
-	lradc->base = devm_ioremap_resource(dev,
-			      platform_get_resource(pdev, IORESOURCE_MEM, 0));
+	lradc->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(lradc->base))
 		return PTR_ERR(lradc->base);