* [PATCH] clk: imx: use devm_platform_ioremap_resource() to simplify code
@ 2019-04-01 5:13 ` Anson Huang
0 siblings, 0 replies; 6+ messages in thread
From: Anson Huang @ 2019-04-01 5:13 UTC (permalink / raw)
To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam,
Aisheng Dong, weiyongjun1, robh, linux-clk, linux-arm-kernel,
linux-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/clk/imx/clk-imx8qxp-lpcg.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8qxp-lpcg.c
index fb6edf1..c711654 100644
--- a/drivers/clk/imx/clk-imx8qxp-lpcg.c
+++ b/drivers/clk/imx/clk-imx8qxp-lpcg.c
@@ -159,7 +159,6 @@ static int imx8qxp_lpcg_clk_probe(struct platform_device *pdev)
struct clk_hw_onecell_data *clk_data;
const struct imx8qxp_ss_lpcg *ss_lpcg;
const struct imx8qxp_lpcg_data *lpcg;
- struct resource *res;
struct clk_hw **clks;
void __iomem *base;
int i;
@@ -168,10 +167,7 @@ static int imx8qxp_lpcg_clk_probe(struct platform_device *pdev)
if (!ss_lpcg)
return -ENODEV;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -EINVAL;
- base = devm_ioremap(dev, res->start, resource_size(res));
+ base = devm_platform_ioremap_resource(pdev, 0);
if (!base)
return -ENOMEM;
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] clk: imx: use devm_platform_ioremap_resource() to simplify code
@ 2019-04-01 5:13 ` Anson Huang
0 siblings, 0 replies; 6+ messages in thread
From: Anson Huang @ 2019-04-01 5:13 UTC (permalink / raw)
To: mturquette, sboyd, shawnguo, s.hauer, kernel, festevam,
Aisheng Dong, weiyongjun1, robh, linux-clk, linux-arm-kernel,
linux-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/clk/imx/clk-imx8qxp-lpcg.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8qxp-lpcg.c
index fb6edf1..c711654 100644
--- a/drivers/clk/imx/clk-imx8qxp-lpcg.c
+++ b/drivers/clk/imx/clk-imx8qxp-lpcg.c
@@ -159,7 +159,6 @@ static int imx8qxp_lpcg_clk_probe(struct platform_device *pdev)
struct clk_hw_onecell_data *clk_data;
const struct imx8qxp_ss_lpcg *ss_lpcg;
const struct imx8qxp_lpcg_data *lpcg;
- struct resource *res;
struct clk_hw **clks;
void __iomem *base;
int i;
@@ -168,10 +167,7 @@ static int imx8qxp_lpcg_clk_probe(struct platform_device *pdev)
if (!ss_lpcg)
return -ENODEV;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -EINVAL;
- base = devm_ioremap(dev, res->start, resource_size(res));
+ base = devm_platform_ioremap_resource(pdev, 0);
if (!base)
return -ENOMEM;
--
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] clk: imx: use devm_platform_ioremap_resource() to simplify code
2019-04-01 5:13 ` Anson Huang
@ 2019-04-01 8:04 ` Mukesh Ojha
-1 siblings, 0 replies; 6+ messages in thread
From: Mukesh Ojha @ 2019-04-01 8:04 UTC (permalink / raw)
To: Anson Huang, mturquette, sboyd, shawnguo, s.hauer, kernel,
festevam, Aisheng Dong, weiyongjun1, robh, linux-clk,
linux-arm-kernel, linux-kernel
Cc: dl-linux-imx
On 4/1/2019 10:43 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/clk/imx/clk-imx8qxp-lpcg.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8qxp-lpcg.c
> index fb6edf1..c711654 100644
> --- a/drivers/clk/imx/clk-imx8qxp-lpcg.c
> +++ b/drivers/clk/imx/clk-imx8qxp-lpcg.c
> @@ -159,7 +159,6 @@ static int imx8qxp_lpcg_clk_probe(struct platform_device *pdev)
> struct clk_hw_onecell_data *clk_data;
> const struct imx8qxp_ss_lpcg *ss_lpcg;
> const struct imx8qxp_lpcg_data *lpcg;
> - struct resource *res;
> struct clk_hw **clks;
> void __iomem *base;
> int i;
> @@ -168,10 +167,7 @@ static int imx8qxp_lpcg_clk_probe(struct platform_device *pdev)
> if (!ss_lpcg)
> return -ENODEV;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -EINVAL;
> - base = devm_ioremap(dev, res->start, resource_size(res));
> + base = devm_platform_ioremap_resource(pdev, 0);
> if (!base)
> return -ENOMEM;
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: imx: use devm_platform_ioremap_resource() to simplify code
@ 2019-04-01 8:04 ` Mukesh Ojha
0 siblings, 0 replies; 6+ messages in thread
From: Mukesh Ojha @ 2019-04-01 8:04 UTC (permalink / raw)
To: Anson Huang, mturquette, sboyd, shawnguo, s.hauer, kernel,
festevam, Aisheng Dong, weiyongjun1, robh, linux-clk,
linux-arm-kernel, linux-kernel
Cc: dl-linux-imx
On 4/1/2019 10:43 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/clk/imx/clk-imx8qxp-lpcg.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/clk/imx/clk-imx8qxp-lpcg.c b/drivers/clk/imx/clk-imx8qxp-lpcg.c
> index fb6edf1..c711654 100644
> --- a/drivers/clk/imx/clk-imx8qxp-lpcg.c
> +++ b/drivers/clk/imx/clk-imx8qxp-lpcg.c
> @@ -159,7 +159,6 @@ static int imx8qxp_lpcg_clk_probe(struct platform_device *pdev)
> struct clk_hw_onecell_data *clk_data;
> const struct imx8qxp_ss_lpcg *ss_lpcg;
> const struct imx8qxp_lpcg_data *lpcg;
> - struct resource *res;
> struct clk_hw **clks;
> void __iomem *base;
> int i;
> @@ -168,10 +167,7 @@ static int imx8qxp_lpcg_clk_probe(struct platform_device *pdev)
> if (!ss_lpcg)
> return -ENODEV;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res)
> - return -EINVAL;
> - base = devm_ioremap(dev, res->start, resource_size(res));
> + base = devm_platform_ioremap_resource(pdev, 0);
> if (!base)
> return -ENOMEM;
>
_______________________________________________
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] clk: imx: use devm_platform_ioremap_resource() to simplify code
2019-04-01 5:13 ` Anson Huang
@ 2019-04-11 5:10 ` Shawn Guo
-1 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2019-04-11 5:10 UTC (permalink / raw)
To: Anson Huang
Cc: mturquette, sboyd, s.hauer, kernel, festevam, Aisheng Dong,
weiyongjun1, robh, linux-clk, linux-arm-kernel, linux-kernel,
dl-linux-imx
On Mon, Apr 01, 2019 at 05:13:02AM +0000, 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clk: imx: use devm_platform_ioremap_resource() to simplify code
@ 2019-04-11 5:10 ` Shawn Guo
0 siblings, 0 replies; 6+ messages in thread
From: Shawn Guo @ 2019-04-11 5:10 UTC (permalink / raw)
To: Anson Huang
Cc: Aisheng Dong, robh, sboyd, mturquette, linux-kernel, linux-clk,
weiyongjun1, dl-linux-imx, kernel, festevam, s.hauer,
linux-arm-kernel
On Mon, Apr 01, 2019 at 05:13:02AM +0000, 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>
Applied, thanks.
_______________________________________________
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-04-11 5:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-01 5:13 [PATCH] clk: imx: use devm_platform_ioremap_resource() to simplify code Anson Huang
2019-04-01 5:13 ` Anson Huang
2019-04-01 8:04 ` Mukesh Ojha
2019-04-01 8:04 ` Mukesh Ojha
2019-04-11 5:10 ` Shawn Guo
2019-04-11 5:10 ` Shawn Guo
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.