Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756080Ab3CNJ2M (ORCPT ); Thu, 14 Mar 2013 05:28:12 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:47842 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755622Ab3CNJ2K (ORCPT ); Thu, 14 Mar 2013 05:28:10 -0400 From: Alexandru Gheorghiu To: Tony Prisk Cc: Grant Likely , Linus Walleij , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandru Gheorghiu Subject: [PATCH] drivers: gpio: Use devm_ioremap_resource function Date: Thu, 14 Mar 2013 11:27:29 +0200 Message-Id: <1363253249-3128-1-git-send-email-gheorghiuandru@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1149 Lines: 35 Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Alexandru Gheorghiu --- drivers/gpio/gpio-vt8500.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpio-vt8500.c b/drivers/gpio/gpio-vt8500.c index 81683ca..eaed4ac 100644 --- a/drivers/gpio/gpio-vt8500.c +++ b/drivers/gpio/gpio-vt8500.c @@ -309,10 +309,10 @@ static int vt8500_gpio_probe(struct platform_device *pdev) return -ENODEV; } - gpio_base = devm_request_and_ioremap(&pdev->dev, res); - if (!gpio_base) { + gpio_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(gpio_base)) { dev_err(&pdev->dev, "Unable to map GPIO registers\n"); - return -ENOMEM; + return PTR_ERR(gpio_base); } ret = vt8500_add_chips(pdev, gpio_base, of_id->data); -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/