From patchwork Wed Oct 1 05:57:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pramod Gurav X-Patchwork-Id: 395405 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 35DAF14013F for ; Wed, 1 Oct 2014 15:54:18 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751047AbaJAFyR (ORCPT ); Wed, 1 Oct 2014 01:54:17 -0400 Received: from smtp114.ord1c.emailsrvr.com ([108.166.43.114]:54659 "EHLO smtp114.ord1c.emailsrvr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750981AbaJAFyQ (ORCPT ); Wed, 1 Oct 2014 01:54:16 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp15.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 1B30E380261; Wed, 1 Oct 2014 01:54:16 -0400 (EDT) X-Virus-Scanned: OK Received: by smtp15.relay.ord1c.emailsrvr.com (Authenticated sender: pramod.gurav-AT-smartplayin.com) with ESMTPSA id B7598380132; Wed, 1 Oct 2014 01:54:13 -0400 (EDT) X-Sender-Id: pramod.gurav@smartplayin.com Received: from SPINITLTDL00278.smartplayin.local ([UNAVAILABLE]. [220.227.185.53]) (using TLSv1.1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:465 (trex/5.2.13); Wed, 01 Oct 2014 05:54:16 GMT From: Pramod Gurav To: linux-kernel@vger.kernel.org Cc: Pramod Gurav , Linus Walleij , Alexandre Courbot , Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-gpio@vger.kernel.org Subject: [PATCH] serial: remove use of gpiochip_remove() retval Date: Wed, 1 Oct 2014 11:27:49 +0530 Message-Id: <1412143069-18562-1-git-send-email-pramod.gurav@smartplayin.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Get rid of using return value from gpiochip_remove() as it returns void with a new change in kernel. Cc: Linus Walleij Cc: Alexandre Courbot Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: linux-serial@vger.kernel.org Cc: linux-gpio@vger.kernel.org Signed-off-by: Pramod Gurav --- drivers/tty/serial/max310x.c | 10 ++++------ drivers/tty/serial/sc16is7xx.c | 13 +++++-------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c index 82573dc..0041a64 100644 --- a/drivers/tty/serial/max310x.c +++ b/drivers/tty/serial/max310x.c @@ -1248,7 +1248,7 @@ static int max310x_probe(struct device *dev, struct max310x_devtype *devtype, mutex_destroy(&s->mutex); #ifdef CONFIG_GPIOLIB - WARN_ON(gpiochip_remove(&s->gpio)); + gpiochip_remove(&s->gpio); out_uart: #endif @@ -1263,12 +1263,10 @@ out_clk: static int max310x_remove(struct device *dev) { struct max310x_port *s = dev_get_drvdata(dev); - int i, ret = 0; + int i; #ifdef CONFIG_GPIOLIB - ret = gpiochip_remove(&s->gpio); - if (ret) - return ret; + gpiochip_remove(&s->gpio); #endif for (i = 0; i < s->uart.nr; i++) { @@ -1282,7 +1280,7 @@ static int max310x_remove(struct device *dev) uart_unregister_driver(&s->uart); clk_disable_unprepare(s->clk); - return ret; + return 0; } static const struct of_device_id __maybe_unused max310x_dt_ids[] = { diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c index 3284c31..6246820 100644 --- a/drivers/tty/serial/sc16is7xx.c +++ b/drivers/tty/serial/sc16is7xx.c @@ -1157,7 +1157,7 @@ static int sc16is7xx_probe(struct device *dev, #ifdef CONFIG_GPIOLIB if (devtype->nr_gpio) - WARN_ON(gpiochip_remove(&s->gpio)); + gpiochip_remove(&s->gpio); out_uart: #endif @@ -1173,14 +1173,11 @@ out_clk: static int sc16is7xx_remove(struct device *dev) { struct sc16is7xx_port *s = dev_get_drvdata(dev); - int i, ret = 0; + int i; #ifdef CONFIG_GPIOLIB - if (s->devtype->nr_gpio) { - ret = gpiochip_remove(&s->gpio); - if (ret) - return ret; - } + if (s->devtype->nr_gpio) + gpiochip_remove(&s->gpio); #endif for (i = 0; i < s->uart.nr; i++) { @@ -1195,7 +1192,7 @@ static int sc16is7xx_remove(struct device *dev) if (!IS_ERR(s->clk)) clk_disable_unprepare(s->clk); - return ret; + return 0; } static const struct of_device_id __maybe_unused sc16is7xx_dt_ids[] = {