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: 37470 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8E8E520549 for ; Tue, 16 Sep 2014 22:12:28 +0000 (UTC) Received: by mail-la0-f72.google.com with SMTP id gi9sf287562lab.3 for ; Tue, 16 Sep 2014 15:12:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=mYRi/lUXM7Gp6K1iWdRVFN4cdB4b2HZWMww0VAS9flQ=; b=J2xE07RKbCCMn1Z88lITqReGhBF+CPTdpDjtVk9eJw3l2Haqsjjp+KHT21fYJpuQdL ZQo8wx780BXIKyX2A+HjsazOrRlzgrTHv77rPjHQYVUY2u2hL+2h6+r82lYl0bJ4kcAg y/4jsyzPTrZUPHWTfvi8M/ZMNeZEh56qAhw4V08SUGwpFvEHhF8+YVwAlFtO8OVXCv2p BcG6zprd/qBviNk++lmnMmvKn7XibCSHeu77OvXzgDiPiraKBISYVTW4y6si0oe6Pco4 qSWrVZeWGmx43Qiw9cvidCgKS7FwxgmTvJWwxwJkn+HYvTpLd3WnUKXr/55mFqxtpklq qFtg== X-Gm-Message-State: ALoCoQmlp18VaBNa3K8WYFB99HCHYJsEsPSzPhV/bjA+2/3mbVAjCpwCLMWxgE3mFJ5I4F+jzeJp X-Received: by 10.180.73.79 with SMTP id j15mr7068614wiv.4.1410905547061; Tue, 16 Sep 2014 15:12:27 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.197 with SMTP id l5ls41846laa.58.gmail; Tue, 16 Sep 2014 15:12:26 -0700 (PDT) X-Received: by 10.112.87.69 with SMTP id v5mr37404683lbz.15.1410905546816; Tue, 16 Sep 2014 15:12:26 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com [209.85.217.172]) by mx.google.com with ESMTPS id yr15si3606057lbb.62.2014.09.16.15.12.26 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Sep 2014 15:12:26 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id w7so697068lbi.31 for ; Tue, 16 Sep 2014 15:12:26 -0700 (PDT) X-Received: by 10.152.5.168 with SMTP id t8mr20697090lat.67.1410905546743; Tue, 16 Sep 2014 15:12:26 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp480436lbb; Tue, 16 Sep 2014 15:12:26 -0700 (PDT) X-Received: by 10.70.38.161 with SMTP id h1mr3467672pdk.105.1410905545266; Tue, 16 Sep 2014 15:12:25 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gh9si32011274pac.62.2014.09.16.15.12.24 for ; Tue, 16 Sep 2014 15:12:25 -0700 (PDT) Received-SPF: none (google.com: linux-gpio-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; 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-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: list List-ID: X-Mailing-List: linux-gpio@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;