[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGb2v65vb0HOHS18-z2dzu=icQGssKtSNWGKa9Uy5dYREURheg@mail.gmail.com>
Date: Wed, 18 Dec 2019 10:46:47 +0800
From: Chen-Yu Tsai <wens@...nel.org>
To: Yangtao Li <tiny.windzz@...il.com>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
Maxime Ripard <mripard@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, rafael@...nel.org,
Vladimir Zapolskiy <vz@...ia.com>,
Kevin Hilman <khilman@...libre.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
Mans Rullgard <mans@...sr.com>,
Thierry Reding <treding@...dia.com>, suzuki.poulose@....com,
Bartosz Golaszewski <bgolaszewski@...libre.com>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
"open list:ARM/Amlogic Meson..." <linux-amlogic@...ts.infradead.org>
Subject: Re: [PATCH 1/5] nvmem: sunxi_sid: convert to devm_platform_ioremap_resource
On Wed, Dec 11, 2019 at 4:32 AM Yangtao Li <tiny.windzz@...il.com> wrote:
>
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
Acked-by: Chen-Yu Tsai <wens@...e.org>
> ---
> drivers/nvmem/sunxi_sid.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
> index e26ef1bbf198..c54adf60b155 100644
> --- a/drivers/nvmem/sunxi_sid.c
> +++ b/drivers/nvmem/sunxi_sid.c
> @@ -112,7 +112,6 @@ static int sun8i_sid_read_by_reg(void *context, unsigned int offset,
> static int sunxi_sid_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> - struct resource *res;
> struct nvmem_config *nvmem_cfg;
> struct nvmem_device *nvmem;
> struct sunxi_sid *sid;
> @@ -129,8 +128,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
> return -EINVAL;
> sid->value_offset = cfg->value_offset;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - sid->base = devm_ioremap_resource(dev, res);
> + sid->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(sid->base))
> return PTR_ERR(sid->base);
>
> --
> 2.17.1
>
Powered by blists - more mailing lists