* [PATCH 1/2] i2c: mxs: use devm_platform_ioremap_resource() to simplify code
@ 2019-07-17 8:40 Anson.Huang
2019-07-17 8:40 ` [PATCH 2/2] i2c: imx-lpi2c: " Anson.Huang
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Anson.Huang @ 2019-07-17 8:40 UTC (permalink / raw)
To: aisheng.dong, shawnguo, s.hauer, kernel, festevam, wsa+renesas,
linux-i2c, linux-arm-kernel, linux-kernel
Cc: Linux-imx
From: Anson Huang <Anson.Huang@nxp.com>
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 <Anson.Huang@nxp.com>
---
drivers/i2c/busses/i2c-mxs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c
index 7d79317..8922491 100644
--- a/drivers/i2c/busses/i2c-mxs.c
+++ b/drivers/i2c/busses/i2c-mxs.c
@@ -802,7 +802,6 @@ static int mxs_i2c_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct mxs_i2c_dev *i2c;
struct i2c_adapter *adap;
- struct resource *res;
int err, irq;
i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL);
@@ -814,8 +813,7 @@ static int mxs_i2c_probe(struct platform_device *pdev)
i2c->dev_type = device_id->driver_data;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- i2c->regs = devm_ioremap_resource(&pdev->dev, res);
+ i2c->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(i2c->regs))
return PTR_ERR(i2c->regs);
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] i2c: imx-lpi2c: use devm_platform_ioremap_resource() to simplify code
2019-07-17 8:40 [PATCH 1/2] i2c: mxs: use devm_platform_ioremap_resource() to simplify code Anson.Huang
@ 2019-07-17 8:40 ` Anson.Huang
2019-07-17 10:22 ` Aisheng Dong
2019-08-01 12:50 ` Wolfram Sang
2019-07-17 10:21 ` [PATCH 1/2] i2c: mxs: " Aisheng Dong
2019-08-01 12:50 ` Wolfram Sang
2 siblings, 2 replies; 6+ messages in thread
From: Anson.Huang @ 2019-07-17 8:40 UTC (permalink / raw)
To: aisheng.dong, shawnguo, s.hauer, kernel, festevam, wsa+renesas,
linux-i2c, linux-arm-kernel, linux-kernel
Cc: Linux-imx
From: Anson Huang <Anson.Huang@nxp.com>
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 <Anson.Huang@nxp.com>
---
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(&pdev->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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [PATCH 2/2] i2c: imx-lpi2c: use devm_platform_ioremap_resource() to simplify code
2019-07-17 8:40 ` [PATCH 2/2] i2c: imx-lpi2c: " Anson.Huang
@ 2019-07-17 10:22 ` Aisheng Dong
2019-08-01 12:50 ` Wolfram Sang
1 sibling, 0 replies; 6+ messages in thread
From: Aisheng Dong @ 2019-07-17 10:22 UTC (permalink / raw)
To: Anson Huang, shawnguo, s.hauer, kernel, festevam, wsa+renesas,
linux-i2c, linux-arm-kernel, linux-kernel
Cc: dl-linux-imx
> From: Anson.Huang@nxp.com <Anson.Huang@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 <Anson.Huang@nxp.com>
Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Regards
Aisheng
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] i2c: imx-lpi2c: use devm_platform_ioremap_resource() to simplify code
2019-07-17 8:40 ` [PATCH 2/2] i2c: imx-lpi2c: " Anson.Huang
2019-07-17 10:22 ` Aisheng Dong
@ 2019-08-01 12:50 ` Wolfram Sang
1 sibling, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2019-08-01 12:50 UTC (permalink / raw)
To: Anson.Huang
Cc: aisheng.dong, shawnguo, s.hauer, linux-kernel, wsa+renesas,
linux-i2c, kernel, festevam, linux-arm-kernel, Linux-imx
[-- Attachment #1.1: Type: text/plain, Size: 368 bytes --]
On Wed, Jul 17, 2019 at 04:40:17PM +0800, Anson.Huang@nxp.com wrote:
> From: Anson Huang <Anson.Huang@nxp.com>
>
> 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 <Anson.Huang@nxp.com>
Applied to for-next, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 1/2] i2c: mxs: use devm_platform_ioremap_resource() to simplify code
2019-07-17 8:40 [PATCH 1/2] i2c: mxs: use devm_platform_ioremap_resource() to simplify code Anson.Huang
2019-07-17 8:40 ` [PATCH 2/2] i2c: imx-lpi2c: " Anson.Huang
@ 2019-07-17 10:21 ` Aisheng Dong
2019-08-01 12:50 ` Wolfram Sang
2 siblings, 0 replies; 6+ messages in thread
From: Aisheng Dong @ 2019-07-17 10:21 UTC (permalink / raw)
To: Anson Huang, shawnguo, s.hauer, kernel, festevam, wsa+renesas,
linux-i2c, linux-arm-kernel, linux-kernel
Cc: dl-linux-imx
> From: Anson.Huang@nxp.com <Anson.Huang@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 <Anson.Huang@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Regards
Aisheng
> ---
> drivers/i2c/busses/i2c-mxs.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-mxs.c b/drivers/i2c/busses/i2c-mxs.c index
> 7d79317..8922491 100644
> --- a/drivers/i2c/busses/i2c-mxs.c
> +++ b/drivers/i2c/busses/i2c-mxs.c
> @@ -802,7 +802,6 @@ static int mxs_i2c_probe(struct platform_device
> *pdev)
> struct device *dev = &pdev->dev;
> struct mxs_i2c_dev *i2c;
> struct i2c_adapter *adap;
> - struct resource *res;
> int err, irq;
>
> i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL); @@ -814,8 +813,7
> @@ static int mxs_i2c_probe(struct platform_device *pdev)
> i2c->dev_type = device_id->driver_data;
> }
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - i2c->regs = devm_ioremap_resource(&pdev->dev, res);
> + i2c->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(i2c->regs))
> return PTR_ERR(i2c->regs);
>
> --
> 2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] i2c: mxs: use devm_platform_ioremap_resource() to simplify code
2019-07-17 8:40 [PATCH 1/2] i2c: mxs: use devm_platform_ioremap_resource() to simplify code Anson.Huang
2019-07-17 8:40 ` [PATCH 2/2] i2c: imx-lpi2c: " Anson.Huang
2019-07-17 10:21 ` [PATCH 1/2] i2c: mxs: " Aisheng Dong
@ 2019-08-01 12:50 ` Wolfram Sang
2 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2019-08-01 12:50 UTC (permalink / raw)
To: Anson.Huang
Cc: aisheng.dong, shawnguo, s.hauer, linux-kernel, wsa+renesas,
linux-i2c, kernel, festevam, linux-arm-kernel, Linux-imx
[-- Attachment #1.1: Type: text/plain, Size: 368 bytes --]
On Wed, Jul 17, 2019 at 04:40:16PM +0800, Anson.Huang@nxp.com wrote:
> From: Anson Huang <Anson.Huang@nxp.com>
>
> 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 <Anson.Huang@nxp.com>
Applied to for-next, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-01 12:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 8:40 [PATCH 1/2] i2c: mxs: use devm_platform_ioremap_resource() to simplify code Anson.Huang
2019-07-17 8:40 ` [PATCH 2/2] i2c: imx-lpi2c: " Anson.Huang
2019-07-17 10:22 ` Aisheng Dong
2019-08-01 12:50 ` Wolfram Sang
2019-07-17 10:21 ` [PATCH 1/2] i2c: mxs: " Aisheng Dong
2019-08-01 12:50 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).