From patchwork Fri Dec 22 16:17:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 10130897 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D47C36038F for ; Fri, 22 Dec 2017 16:18:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF1002A093 for ; Fri, 22 Dec 2017 16:18:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3CBA2A0DA; Fri, 22 Dec 2017 16:18:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3EA42A0D1 for ; Fri, 22 Dec 2017 16:18:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbdLVQSD (ORCPT ); Fri, 22 Dec 2017 11:18:03 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:55434 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752549AbdLVQSD (ORCPT ); Fri, 22 Dec 2017 11:18:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Message-Id:Date:Subject:Cc:To:From :Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QiF0oz87GHdgZ35fy5F4BSaC68cmt8faI00xEyMY0GI=; b=sZmXa+5y/ZLjtE0cQrbtl86vb TOVgoAK2U4EOVj9zSwvP6QNNMxQNv6PbuPEZjNlVl/h/DsApa7eC4L/q7YZMd7DdqnRFDZqDnTQ3w yIjw6B4QI83mVEnEG3riUhleApCUxsFO1K6QJzGsN7Zo4sgs8VpeItynED09aAuuJHbuA=; Received: from host86-137-148-120.range86-137.btcentralplus.com ([86.137.148.120] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eSQ1F-0000F0-OP; Fri, 22 Dec 2017 16:17:57 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 484F344006B; Fri, 22 Dec 2017 16:17:57 +0000 (GMT) From: Mark Brown To: Stephen Rothwell , Rasmus Villemoes Cc: linux-spi@vger.kernel.org, Mark Brown Subject: [PATCH] spi: pxa2xx: Use gpiod_put() not gpiod_free() Date: Fri, 22 Dec 2017 16:17:55 +0000 Message-Id: <20171222161755.2742-1-broonie@kernel.org> X-Mailer: git-send-email 2.15.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP gpiod_free() is an internal function for gpiolib, gpiod_put() is the correct external function. Reported-by: Stephen Rothwell Suggested-by: Rasmus Villemoes Signed-off-by: Mark Brown --- drivers/spi/spi-pxa2xx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index c209dc1047b5..b0822d1dba29 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1237,7 +1237,7 @@ static int setup_cs(struct spi_device *spi, struct chip_data *chip, * different chip_info, release previously requested GPIO */ if (chip->gpiod_cs) { - gpiod_free(chip->gpiod_cs); + gpiod_put(chip->gpiod_cs); chip->gpiod_cs = NULL; } @@ -1417,7 +1417,7 @@ static void cleanup(struct spi_device *spi) if (drv_data->ssp_type != CE4100_SSP && !drv_data->cs_gpiods && chip->gpiod_cs) - gpiod_free(chip->gpiod_cs); + gpiod_put(chip->gpiod_cs); kfree(chip); }