Re: [PATCH 2/2] i2c: imx-lpi2c: use devm_platform_ioremap_resource() to simplify code

2019-08-01 Thread Wolfram Sang
On Wed, Jul 17, 2019 at 04:40:17PM +0800, anson.hu...@nxp.com wrote:
> From: Anson Huang 
> 
> Use the new helper devm_platform_ioremap_resource() which wraps the
> platform_get_resource() and devm_ioremap_resource() together, to
> simplify the code.
> 
> Signed-off-by: Anson Huang 

Applied to for-next, thanks!



signature.asc
Description: PGP signature


RE: [PATCH 2/2] i2c: imx-lpi2c: use devm_platform_ioremap_resource() to simplify code

2019-07-17 Thread Aisheng Dong
> From: anson.hu...@nxp.com 
> Sent: Wednesday, July 17, 2019 4:40 PM
> 
> Use the new helper devm_platform_ioremap_resource() which wraps the
> platform_get_resource() and devm_ioremap_resource() together, to simplify
> the code.
> 
> Signed-off-by: Anson Huang 

Acked-by: Dong Aisheng 

Regards
Aisheng


[PATCH 2/2] i2c: imx-lpi2c: use devm_platform_ioremap_resource() to simplify code

2019-07-17 Thread Anson . Huang
From: Anson Huang 

Use the new helper devm_platform_ioremap_resource() which wraps the
platform_get_resource() and devm_ioremap_resource() together, to
simplify the code.

Signed-off-by: Anson Huang 
---
 drivers/i2c/busses/i2c-imx-lpi2c.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c 
b/drivers/i2c/busses/i2c-imx-lpi2c.c
index dc00fab..c92b564 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -545,7 +545,6 @@ MODULE_DEVICE_TABLE(of, lpi2c_imx_of_match);
 static int lpi2c_imx_probe(struct platform_device *pdev)
 {
struct lpi2c_imx_struct *lpi2c_imx;
-   struct resource *res;
unsigned int temp;
int irq, ret;
 
@@ -553,8 +552,7 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
if (!lpi2c_imx)
return -ENOMEM;
 
-   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-   lpi2c_imx->base = devm_ioremap_resource(>dev, res);
+   lpi2c_imx->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(lpi2c_imx->base))
return PTR_ERR(lpi2c_imx->base);
 
-- 
2.7.4