From patchwork Tue Sep 16 22:12:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 390208 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2E7B81400AF for ; Wed, 17 Sep 2014 08:12:25 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754037AbaIPWMY (ORCPT ); Tue, 16 Sep 2014 18:12:24 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:56901 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753319AbaIPWMX (ORCPT ); Tue, 16 Sep 2014 18:12:23 -0400 Received: by mail-pa0-f41.google.com with SMTP id bj1so702653pad.0 for ; Tue, 16 Sep 2014 15:12:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=bkrl7SIhyKfmQlpyWUttgVAGJQaYMcbLVXPjU0QylJA=; b=T/FA2uukT9YYk8AG6iVM7u1k4NEgTdGti77o6yqZTolVn7eSn6UUzcf3onEB8YLAq+ NOuMucTc+bFicvwGBtqOOYTUmzD6Q5tZiFWvdrcR2LfFsNGCTXBnYFICupwijG8EdKmP DECgCb8U1UeiC04y1frA/xH3gqoB6bv5rgT+vBcVtVc0LLFUEZsTmGK9vOlbd54QAOJa FnUGzT/zTZcG5H4Ur9NXEFTNr/vddgzMlTeihGgZQ5Z3liQGRPsG7fxIz+bTAIPA/2s4 RTWZmUybsh3qJRKQ27cTsrO/ekvAct5RbvmCayMR083+LNvTDopIRejTnsHa9yE7ycO5 i+6g== X-Gm-Message-State: ALoCoQks7ssgpxcoBBhGAPYlyze288m9zrbqgoBKnO4Dv3PoLIu52/7akat+8t6vFa9NB3VhxHRe X-Received: by 10.68.241.230 with SMTP id wl6mr55075151pbc.1.1410905542716; Tue, 16 Sep 2014 15:12:22 -0700 (PDT) Received: from localhost.localdomain.com (70-35-38-154.static.wiline.com. [70.35.38.154]) by mx.google.com with ESMTPSA id kj8sm14993411pdb.79.2014.09.16.15.12.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Sep 2014 15:12:21 -0700 (PDT) From: Linus Walleij To: linux-gpio@vger.kernel.org Cc: Alexandre Courbot , Linus Walleij Subject: [PATCH] gpio: remove remaining users of gpiochip_remove() retval Date: Tue, 16 Sep 2014 15:12:14 -0700 Message-Id: <1410905534-22650-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Some drivers accidentally still use the return value from gpiochip_remove(). Get rid of them so we can simplify this function and get rid of the return value. Abdoulaye Berthe Signed-off-by: Linus Walleij Acked-by: Javier Martinez Canillas Acked-by: Alexandre Courbot --- drivers/gpio/gpio-crystalcove.c | 9 +++------ drivers/gpio/gpio-omap.c | 2 +- drivers/gpio/gpio-xgene.c | 7 ++----- drivers/gpio/gpio-zynq.c | 8 +------- 4 files changed, 7 insertions(+), 19 deletions(-) diff --git a/drivers/gpio/gpio-crystalcove.c b/drivers/gpio/gpio-crystalcove.c index 934462f5bd22..e3712f0e51ab 100644 --- a/drivers/gpio/gpio-crystalcove.c +++ b/drivers/gpio/gpio-crystalcove.c @@ -346,7 +346,7 @@ static int crystalcove_gpio_probe(struct platform_device *pdev) return 0; out_remove_gpio: - WARN_ON(gpiochip_remove(&cg->chip)); + gpiochip_remove(&cg->chip); return retval; } @@ -354,14 +354,11 @@ static int crystalcove_gpio_remove(struct platform_device *pdev) { struct crystalcove_gpio *cg = platform_get_drvdata(pdev); int irq = platform_get_irq(pdev, 0); - int err; - - err = gpiochip_remove(&cg->chip); + gpiochip_remove(&cg->chip); if (irq >= 0) free_irq(irq, cg); - - return err; + return 0; } static struct platform_driver crystalcove_gpio_driver = { diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index 174932165fcb..5cd33677a018 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1143,7 +1143,7 @@ static int omap_gpio_chip_init(struct gpio_bank *bank) if (ret) { dev_err(bank->dev, "Couldn't add irqchip to gpiochip %d\n", ret); - ret = gpiochip_remove(&bank->chip); + gpiochip_remove(&bank->chip); return -ENODEV; } diff --git a/drivers/gpio/gpio-xgene.c b/drivers/gpio/gpio-xgene.c index e25ba14fbb64..f1944d496c3b 100644 --- a/drivers/gpio/gpio-xgene.c +++ b/drivers/gpio/gpio-xgene.c @@ -216,12 +216,9 @@ err: static int xgene_gpio_remove(struct platform_device *pdev) { struct xgene_gpio *gpio = platform_get_drvdata(pdev); - int ret = 0; - ret = gpiochip_remove(&gpio->chip); - if (ret) - dev_err(&pdev->dev, "unable to remove gpio_chip.\n"); - return ret; + gpiochip_remove(&gpio->chip); + return 0; } #ifdef CONFIG_OF diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c index 5dfbced24815..74cd480bf8de 100644 --- a/drivers/gpio/gpio-zynq.c +++ b/drivers/gpio/gpio-zynq.c @@ -686,16 +686,10 @@ err_disable_clk: */ static int zynq_gpio_remove(struct platform_device *pdev) { - int ret; struct zynq_gpio *gpio = platform_get_drvdata(pdev); pm_runtime_get_sync(&pdev->dev); - - ret = gpiochip_remove(&gpio->chip); - if (ret) { - dev_err(&pdev->dev, "Failed to remove gpio chip\n"); - return ret; - } + gpiochip_remove(&gpio->chip); clk_disable_unprepare(gpio->clk); device_set_wakeup_capable(&pdev->dev, 0); return 0;