All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
@ 2019-04-01  6:21 ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2019-04-01  6:21 UTC (permalink / raw)
  To: tglx, jason, marc.zyngier, shawnguo, s.hauer, kernel, festevam,
	linux-kernel, linux-arm-kernel
  Cc: dl-linux-imx

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/irqchip/irq-imx-irqsteer.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
index 88df3d00..290531e 100644
--- a/drivers/irqchip/irq-imx-irqsteer.c
+++ b/drivers/irqchip/irq-imx-irqsteer.c
@@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct irqsteer_data *data;
-	struct resource *res;
 	u32 irqs_num;
 	int i, ret;
 
@@ -152,8 +151,7 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
 	if (!data)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	data->regs = devm_ioremap_resource(&pdev->dev, res);
+	data->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(data->regs)) {
 		dev_err(&pdev->dev, "failed to initialize reg\n");
 		return PTR_ERR(data->regs);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH] irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
@ 2019-04-01  6:21 ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2019-04-01  6:21 UTC (permalink / raw)
  To: tglx, jason, marc.zyngier, shawnguo, s.hauer, kernel, festevam,
	linux-kernel, linux-arm-kernel
  Cc: dl-linux-imx

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/irqchip/irq-imx-irqsteer.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
index 88df3d00..290531e 100644
--- a/drivers/irqchip/irq-imx-irqsteer.c
+++ b/drivers/irqchip/irq-imx-irqsteer.c
@@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct irqsteer_data *data;
-	struct resource *res;
 	u32 irqs_num;
 	int i, ret;
 
@@ -152,8 +151,7 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
 	if (!data)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	data->regs = devm_ioremap_resource(&pdev->dev, res);
+	data->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(data->regs)) {
 		dev_err(&pdev->dev, "failed to initialize reg\n");
 		return PTR_ERR(data->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] 8+ messages in thread

* Re: [PATCH] irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
  2019-04-01  6:21 ` Anson Huang
@ 2019-04-01  7:47   ` Mukesh Ojha
  -1 siblings, 0 replies; 8+ messages in thread
From: Mukesh Ojha @ 2019-04-01  7:47 UTC (permalink / raw)
  To: Anson Huang, tglx, jason, marc.zyngier, shawnguo, s.hauer,
	kernel, festevam, linux-kernel, linux-arm-kernel
  Cc: dl-linux-imx


On 4/1/2019 11:51 AM, Anson Huang wrote:
> 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: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh
> ---
>   drivers/irqchip/irq-imx-irqsteer.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
> index 88df3d00..290531e 100644
> --- a/drivers/irqchip/irq-imx-irqsteer.c
> +++ b/drivers/irqchip/irq-imx-irqsteer.c
> @@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
>   {
>   	struct device_node *np = pdev->dev.of_node;
>   	struct irqsteer_data *data;
> -	struct resource *res;
>   	u32 irqs_num;
>   	int i, ret;
>   
> @@ -152,8 +151,7 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
>   	if (!data)
>   		return -ENOMEM;
>   
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	data->regs = devm_ioremap_resource(&pdev->dev, res);
> +	data->regs = devm_platform_ioremap_resource(pdev, 0);
>   	if (IS_ERR(data->regs)) {
>   		dev_err(&pdev->dev, "failed to initialize reg\n");
>   		return PTR_ERR(data->regs);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
@ 2019-04-01  7:47   ` Mukesh Ojha
  0 siblings, 0 replies; 8+ messages in thread
From: Mukesh Ojha @ 2019-04-01  7:47 UTC (permalink / raw)
  To: Anson Huang, tglx, jason, marc.zyngier, shawnguo, s.hauer,
	kernel, festevam, linux-kernel, linux-arm-kernel
  Cc: dl-linux-imx


On 4/1/2019 11:51 AM, Anson Huang wrote:
> 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: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh
> ---
>   drivers/irqchip/irq-imx-irqsteer.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/irqchip/irq-imx-irqsteer.c b/drivers/irqchip/irq-imx-irqsteer.c
> index 88df3d00..290531e 100644
> --- a/drivers/irqchip/irq-imx-irqsteer.c
> +++ b/drivers/irqchip/irq-imx-irqsteer.c
> @@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
>   {
>   	struct device_node *np = pdev->dev.of_node;
>   	struct irqsteer_data *data;
> -	struct resource *res;
>   	u32 irqs_num;
>   	int i, ret;
>   
> @@ -152,8 +151,7 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
>   	if (!data)
>   		return -ENOMEM;
>   
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	data->regs = devm_ioremap_resource(&pdev->dev, res);
> +	data->regs = devm_platform_ioremap_resource(pdev, 0);
>   	if (IS_ERR(data->regs)) {
>   		dev_err(&pdev->dev, "failed to initialize reg\n");
>   		return PTR_ERR(data->regs);

_______________________________________________
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] 8+ messages in thread

* RE: [PATCH] irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
  2019-04-01  7:47   ` Mukesh Ojha
@ 2019-04-28  6:28     ` Anson Huang
  -1 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2019-04-28  6:28 UTC (permalink / raw)
  To: Mukesh Ojha, tglx, jason, marc.zyngier, shawnguo, s.hauer,
	kernel, festevam, linux-kernel, linux-arm-kernel
  Cc: dl-linux-imx

Ping...

> -----Original Message-----
> From: Mukesh Ojha [mailto:mojha@codeaurora.org]
> Sent: Monday, April 1, 2019 3:47 PM
> To: Anson Huang <anson.huang@nxp.com>; tglx@linutronix.de;
> jason@lakedaemon.net; marc.zyngier@arm.com; shawnguo@kernel.org;
> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> Cc: dl-linux-imx <linux-imx@nxp.com>
> Subject: Re: [PATCH] irqchip/imx-irqsteer: use
> devm_platform_ioremap_resource() to simplify code
> 
> 
> On 4/1/2019 11:51 AM, Anson Huang wrote:
> > 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: Mukesh Ojha <mojha@codeaurora.org>
> 
> Cheers,
> -Mukesh
> > ---
> >   drivers/irqchip/irq-imx-irqsteer.c | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/irqchip/irq-imx-irqsteer.c
> > b/drivers/irqchip/irq-imx-irqsteer.c
> > index 88df3d00..290531e 100644
> > --- a/drivers/irqchip/irq-imx-irqsteer.c
> > +++ b/drivers/irqchip/irq-imx-irqsteer.c
> > @@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct
> platform_device *pdev)
> >   {
> >   	struct device_node *np = pdev->dev.of_node;
> >   	struct irqsteer_data *data;
> > -	struct resource *res;
> >   	u32 irqs_num;
> >   	int i, ret;
> >
> > @@ -152,8 +151,7 @@ static int imx_irqsteer_probe(struct
> platform_device *pdev)
> >   	if (!data)
> >   		return -ENOMEM;
> >
> > -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > -	data->regs = devm_ioremap_resource(&pdev->dev, res);
> > +	data->regs = devm_platform_ioremap_resource(pdev, 0);
> >   	if (IS_ERR(data->regs)) {
> >   		dev_err(&pdev->dev, "failed to initialize reg\n");
> >   		return PTR_ERR(data->regs);

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
@ 2019-04-28  6:28     ` Anson Huang
  0 siblings, 0 replies; 8+ messages in thread
From: Anson Huang @ 2019-04-28  6:28 UTC (permalink / raw)
  To: Mukesh Ojha, tglx, jason, marc.zyngier, shawnguo, s.hauer,
	kernel, festevam, linux-kernel, linux-arm-kernel
  Cc: dl-linux-imx

Ping...

> -----Original Message-----
> From: Mukesh Ojha [mailto:mojha@codeaurora.org]
> Sent: Monday, April 1, 2019 3:47 PM
> To: Anson Huang <anson.huang@nxp.com>; tglx@linutronix.de;
> jason@lakedaemon.net; marc.zyngier@arm.com; shawnguo@kernel.org;
> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> Cc: dl-linux-imx <linux-imx@nxp.com>
> Subject: Re: [PATCH] irqchip/imx-irqsteer: use
> devm_platform_ioremap_resource() to simplify code
> 
> 
> On 4/1/2019 11:51 AM, Anson Huang wrote:
> > 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: Mukesh Ojha <mojha@codeaurora.org>
> 
> Cheers,
> -Mukesh
> > ---
> >   drivers/irqchip/irq-imx-irqsteer.c | 4 +---
> >   1 file changed, 1 insertion(+), 3 deletions(-)
> >
> > diff --git a/drivers/irqchip/irq-imx-irqsteer.c
> > b/drivers/irqchip/irq-imx-irqsteer.c
> > index 88df3d00..290531e 100644
> > --- a/drivers/irqchip/irq-imx-irqsteer.c
> > +++ b/drivers/irqchip/irq-imx-irqsteer.c
> > @@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct
> platform_device *pdev)
> >   {
> >   	struct device_node *np = pdev->dev.of_node;
> >   	struct irqsteer_data *data;
> > -	struct resource *res;
> >   	u32 irqs_num;
> >   	int i, ret;
> >
> > @@ -152,8 +151,7 @@ static int imx_irqsteer_probe(struct
> platform_device *pdev)
> >   	if (!data)
> >   		return -ENOMEM;
> >
> > -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > -	data->regs = devm_ioremap_resource(&pdev->dev, res);
> > +	data->regs = devm_platform_ioremap_resource(pdev, 0);
> >   	if (IS_ERR(data->regs)) {
> >   		dev_err(&pdev->dev, "failed to initialize reg\n");
> >   		return PTR_ERR(data->regs);
_______________________________________________
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] 8+ messages in thread

* Re: [PATCH] irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
  2019-04-28  6:28     ` Anson Huang
@ 2019-04-28  9:33       ` Marc Zyngier
  -1 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2019-04-28  9:33 UTC (permalink / raw)
  To: Anson Huang
  Cc: Mukesh Ojha, tglx, jason, shawnguo, s.hauer, kernel, festevam,
	linux-kernel, linux-arm-kernel, dl-linux-imx

On Sun, 28 Apr 2019 07:28:20 +0100,
Anson Huang <anson.huang@nxp.com> wrote:
> 
> Ping...

I'm still building the 5.2 branch, no need to panic just yet.

Thanks,

	M.

> 
> > -----Original Message-----
> > From: Mukesh Ojha [mailto:mojha@codeaurora.org]
> > Sent: Monday, April 1, 2019 3:47 PM
> > To: Anson Huang <anson.huang@nxp.com>; tglx@linutronix.de;
> > jason@lakedaemon.net; marc.zyngier@arm.com; shawnguo@kernel.org;
> > s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> > linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> > Cc: dl-linux-imx <linux-imx@nxp.com>
> > Subject: Re: [PATCH] irqchip/imx-irqsteer: use
> > devm_platform_ioremap_resource() to simplify code
> > 
> > 
> > On 4/1/2019 11:51 AM, Anson Huang wrote:
> > > 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: Mukesh Ojha <mojha@codeaurora.org>
> > 
> > Cheers,
> > -Mukesh
> > > ---
> > >   drivers/irqchip/irq-imx-irqsteer.c | 4 +---
> > >   1 file changed, 1 insertion(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/irqchip/irq-imx-irqsteer.c
> > > b/drivers/irqchip/irq-imx-irqsteer.c
> > > index 88df3d00..290531e 100644
> > > --- a/drivers/irqchip/irq-imx-irqsteer.c
> > > +++ b/drivers/irqchip/irq-imx-irqsteer.c
> > > @@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct
> > platform_device *pdev)
> > >   {
> > >   	struct device_node *np = pdev->dev.of_node;
> > >   	struct irqsteer_data *data;
> > > -	struct resource *res;
> > >   	u32 irqs_num;
> > >   	int i, ret;
> > >
> > > @@ -152,8 +151,7 @@ static int imx_irqsteer_probe(struct
> > platform_device *pdev)
> > >   	if (!data)
> > >   		return -ENOMEM;
> > >
> > > -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > -	data->regs = devm_ioremap_resource(&pdev->dev, res);
> > > +	data->regs = devm_platform_ioremap_resource(pdev, 0);
> > >   	if (IS_ERR(data->regs)) {
> > >   		dev_err(&pdev->dev, "failed to initialize reg\n");
> > >   		return PTR_ERR(data->regs);

-- 
Jazz is not dead, it just smell funny.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
@ 2019-04-28  9:33       ` Marc Zyngier
  0 siblings, 0 replies; 8+ messages in thread
From: Marc Zyngier @ 2019-04-28  9:33 UTC (permalink / raw)
  To: Anson Huang
  Cc: jason, festevam, s.hauer, linux-kernel, dl-linux-imx, kernel,
	tglx, shawnguo, Mukesh Ojha, linux-arm-kernel

On Sun, 28 Apr 2019 07:28:20 +0100,
Anson Huang <anson.huang@nxp.com> wrote:
> 
> Ping...

I'm still building the 5.2 branch, no need to panic just yet.

Thanks,

	M.

> 
> > -----Original Message-----
> > From: Mukesh Ojha [mailto:mojha@codeaurora.org]
> > Sent: Monday, April 1, 2019 3:47 PM
> > To: Anson Huang <anson.huang@nxp.com>; tglx@linutronix.de;
> > jason@lakedaemon.net; marc.zyngier@arm.com; shawnguo@kernel.org;
> > s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> > linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> > Cc: dl-linux-imx <linux-imx@nxp.com>
> > Subject: Re: [PATCH] irqchip/imx-irqsteer: use
> > devm_platform_ioremap_resource() to simplify code
> > 
> > 
> > On 4/1/2019 11:51 AM, Anson Huang wrote:
> > > 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: Mukesh Ojha <mojha@codeaurora.org>
> > 
> > Cheers,
> > -Mukesh
> > > ---
> > >   drivers/irqchip/irq-imx-irqsteer.c | 4 +---
> > >   1 file changed, 1 insertion(+), 3 deletions(-)
> > >
> > > diff --git a/drivers/irqchip/irq-imx-irqsteer.c
> > > b/drivers/irqchip/irq-imx-irqsteer.c
> > > index 88df3d00..290531e 100644
> > > --- a/drivers/irqchip/irq-imx-irqsteer.c
> > > +++ b/drivers/irqchip/irq-imx-irqsteer.c
> > > @@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct
> > platform_device *pdev)
> > >   {
> > >   	struct device_node *np = pdev->dev.of_node;
> > >   	struct irqsteer_data *data;
> > > -	struct resource *res;
> > >   	u32 irqs_num;
> > >   	int i, ret;
> > >
> > > @@ -152,8 +151,7 @@ static int imx_irqsteer_probe(struct
> > platform_device *pdev)
> > >   	if (!data)
> > >   		return -ENOMEM;
> > >
> > > -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> > > -	data->regs = devm_ioremap_resource(&pdev->dev, res);
> > > +	data->regs = devm_platform_ioremap_resource(pdev, 0);
> > >   	if (IS_ERR(data->regs)) {
> > >   		dev_err(&pdev->dev, "failed to initialize reg\n");
> > >   		return PTR_ERR(data->regs);

-- 
Jazz is not dead, it just smell funny.

_______________________________________________
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] 8+ messages in thread

end of thread, other threads:[~2019-04-28  9:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01  6:21 [PATCH] irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code Anson Huang
2019-04-01  6:21 ` Anson Huang
2019-04-01  7:47 ` Mukesh Ojha
2019-04-01  7:47   ` Mukesh Ojha
2019-04-28  6:28   ` Anson Huang
2019-04-28  6:28     ` Anson Huang
2019-04-28  9:33     ` Marc Zyngier
2019-04-28  9:33       ` Marc Zyngier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.