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: 122655 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2448040qgn; Fri, 22 Dec 2017 08:18:04 -0800 (PST) X-Google-Smtp-Source: ACJfBosQLmrV+58KchT58zn3eXR9MBgDSztSXEfmcVzDGVbkXDCgQ8sm3RsG6A2fkOCVt/bqGoWs X-Received: by 10.99.109.75 with SMTP id i72mr12900365pgc.86.1513959484315; Fri, 22 Dec 2017 08:18:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513959484; cv=none; d=google.com; s=arc-20160816; b=wIN6SIZj0vbRkf3gPZG6izqnUC+U/mQN+3T08vuhmxdaTvBatWmRajerprnnDRJbmM Y41HrxXqu8Go65D+v/VOcjQC2bfWJmUlay7wNTVFs0J8O1J1R3ifpiDHTLJQ1LA451LT oQekLzVmsZ5vS4HTSZEje9nTm7HL3ScGwGtUP9WPzWiV/UiODBeQGwveVdWxVtjIXp5A rBJXvcppxb7uppbECiv4M8alH9ZDcemSYknSZjJ0z7PmGeZTvE8rUWmGZuJqpuN9A+58 5qHRPECnOZz/ElwgljROv4JqaJORrjL2OTiURPQqErwcMctTxv3hAY6R6jC1ReL/j4Of /2tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=nZQx2p74Nn6OshpfLVaJMoLjCAUkg9M2fjA/TIxDRug=; b=NoNHbXz6kzvkbiVAeb9R9DRzMuEa9GdB2N2aRg2jHVYcdZthQqut0V9Lhx/yfQwto2 wtBSOCq0LUvNvsNv0SesCk8hUelTGMdTmTrEjRSNVPTpoPfUwMlSr0Hw143QMNLNHldZ tYQ4Z38WgnWI7jXO9ZzWZtK/yzmBF7TPtSSCZr4dmZkGPr7IlNYpt7QybUObXl9my0NE 2dBXgeyngfJjoi3trR9ekLNAtaOTyefXlgg82SV2aRbCuYl8dEKLCQ6I3+wQEkNmp7bI eGqg/uUmILrc4gK4XYClB9baYY4RxMlHZi9qEnbcDdgRAq62QoR3akeumwjO1kKNR0r6 SXJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=sZmXa+5y; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si16932063plh.762.2017.12.22.08.18.03; Fri, 22 Dec 2017 08:18:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=sZmXa+5y; spf=pass (google.com: best guess record for domain of linux-spi-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-spi-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbdLVQSD (ORCPT + 1 other); 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 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(-) -- 2.15.0 -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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); }