irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
Subsystems (2)
PATCH 1/1 irqchip/imx-irqsteer: use devm_platform_ioremap_resource() to simplify code
Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code.
--- drivers/irqchip/irq-imx-irqsteer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/irqchip/irq-imx-irqsteer.c +1 -3
@@ -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);
Signature · 1 line
2.7.4
Quoted 5 lines · Anson Huang
Use the new helper
devm_platform_ioremap_resource()which wraps theplatform_get_resource()anddevm_ioremap_resource()together, to simplify the code.Signed-off-by Anson Huang <[email protected]>
Cheers,
-Mukesh
Quoted 26 lines
--- drivers/irqchip/irq-imx-irqsteer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/irqchip/irq-imx-irqsteer.c +1
-3@@ -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);
Ping...
Quoted 51 lines
-----Original Message-----
From: Mukesh Ojha [mailto:[email protected]]
Sent: Monday, April 1, 2019 3:47 PM
To: Anson Huang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: dl-linux-imx <[email protected]>
Subject: Re: [PATCH] irqchip/imx-irqsteer: usedevm_platform_ioremap_resource()to simplify codeQuoted 5 lines · Anson Huang
Use the new helper
devm_platform_ioremap_resource()which wraps theplatform_get_resource()anddevm_ioremap_resource()together, to simplify the code.Signed-off-by Anson Huang <[email protected]>Reviewed-by Mukesh Ojha <[email protected]>Cheers,
-Mukeshdrivers/irqchip/irq-imx-irqsteer.c static int imx_irqsteer_probe(struct
Quoted 10 lines
--- drivers/irqchip/irq-imx-irqsteer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/irqchip/irq-imx-irqsteer.c +0
-0@@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct
platform_device*pdev)drivers/irqchip/irq-imx-irqsteer.c static int imx_irqsteer_probe(struct
Quoted 8 lines
drivers/irqchip/irq-imx-irqsteer.c +0
-1{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)Quoted 9 lines
drivers/irqchip/irq-imx-irqsteer.c +1
-2if (!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);
Quoted 2 lines · Anson Huang
Ping...
I'm still building the 5.2 branch, no need to panic just yet.
Thanks,
M.
Quoted 52 lines
Quoted 52 lines
-----Original Message-----
From: Mukesh Ojha [mailto:[email protected]]
Sent: Monday, April 1, 2019 3:47 PM
To: Anson Huang <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
Cc: dl-linux-imx <[email protected]>
Subject: Re: [PATCH] irqchip/imx-irqsteer: usedevm_platform_ioremap_resource()to simplify codeQuoted 5 lines · Anson Huang
Use the new helper
devm_platform_ioremap_resource()which wraps theplatform_get_resource()anddevm_ioremap_resource()together, to simplify the code.Signed-off-by Anson Huang <[email protected]>Reviewed-by Mukesh Ojha <[email protected]>Cheers,
-Mukeshdrivers/irqchip/irq-imx-irqsteer.c static int imx_irqsteer_probe(struct
Quoted 10 lines
--- drivers/irqchip/irq-imx-irqsteer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/irqchip/irq-imx-irqsteer.c +0
-0@@ -144,7 +144,6 @@ static int imx_irqsteer_probe(struct
platform_device*pdev)drivers/irqchip/irq-imx-irqsteer.c static int imx_irqsteer_probe(struct
Quoted 8 lines
drivers/irqchip/irq-imx-irqsteer.c +0
-1{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)Quoted 9 lines
drivers/irqchip/irq-imx-irqsteer.c +1
-2if (!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);
Signature · 1 line
Jazz is not dead, it just smell funny.