[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY5PR12MB4034937150040335D9C68FF9DEBA0@BY5PR12MB4034.namprd12.prod.outlook.com>
Date: Fri, 6 Sep 2019 17:16:27 +0000
From: Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
To: YueHaibing <yuehaibing@...wei.com>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"bgolaszewski@...libre.com" <bgolaszewski@...libre.com>
CC: "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH -next] gpio: creg-snps: use
devm_platform_ioremap_resource() to simplify code
Hi YueHaibing,
thanks,
Acked-by: Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
---
Eugeniy Paltsev
________________________________________
From: YueHaibing <yuehaibing@...wei.com>
Sent: Friday, September 6, 2019 16:10
To: Eugeniy.Paltsev@...opsys.com; linus.walleij@...aro.org; bgolaszewski@...libre.com
Cc: linux-gpio@...r.kernel.org; linux-kernel@...r.kernel.org; kernel-janitors@...r.kernel.org; YueHaibing
Subject: [PATCH -next] gpio: creg-snps: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Signed-off-by: YueHaibing <yuehaibing@...wei.com>
---
drivers/gpio/gpio-creg-snps.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpio/gpio-creg-snps.c b/drivers/gpio/gpio-creg-snps.c
index 8cbc94d..ff19a8a 100644
--- a/drivers/gpio/gpio-creg-snps.c
+++ b/drivers/gpio/gpio-creg-snps.c
@@ -137,7 +137,6 @@ static int creg_gpio_probe(struct platform_device *pdev)
const struct of_device_id *match;
struct device *dev = &pdev->dev;
struct creg_gpio *hcg;
- struct resource *mem;
u32 ngpios;
int ret;
@@ -145,8 +144,7 @@ static int creg_gpio_probe(struct platform_device *pdev)
if (!hcg)
return -ENOMEM;
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- hcg->regs = devm_ioremap_resource(dev, mem);
+ hcg->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(hcg->regs))
return PTR_ERR(hcg->regs);
--
2.7.4
Powered by blists - more mailing lists