From patchwork Tue Apr 8 14:11:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3952331 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C05C99F387 for ; Wed, 9 Apr 2014 03:45:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B4A61205FC for ; Wed, 9 Apr 2014 03:45:54 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 5A0D52060D for ; Wed, 9 Apr 2014 03:45:53 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 77DF82659A7; Wed, 9 Apr 2014 05:45:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id EDAD0266D08; Wed, 9 Apr 2014 01:05:32 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 515E2266D09; Wed, 9 Apr 2014 01:05:31 +0200 (CEST) Received: from mail-pd0-f173.google.com (mail-pd0-f173.google.com [209.85.192.173]) by alsa0.perex.cz (Postfix) with ESMTP id 65ED1268112 for ; Tue, 8 Apr 2014 16:11:46 +0200 (CEST) Received: by mail-pd0-f173.google.com with SMTP id z10so1062626pdj.32 for ; Tue, 08 Apr 2014 07:11:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:mime-version:content-transfer-encoding; bh=ihMgbetkxxJedXbdqcLcdxzoqHRtM5Y2cWgC8Be7WHY=; b=kqxgb4xRaGRacMwr5cYLO9+dOD5IfYl/rlZQE4DutIQEtqWmzw515zUYROJY4vT2Mf vQKYE/hzoIfnRQ65Wc8DTf5/jROdxggTrol507j1ZdiUwq5Z1juit4c5it2lG+ExFJRd ZrG4DV1FlGs6xsCTjiPO1qPhfBBPVNRM1bKF3KV2ZHzHGNa+/MiBrwuv4rCM7OAk5Y0y 8966lq4Ijwbn9tSZR0NjA2BbNMgV32c2lcz8Fr4AJQ/v2vVd0DqsEQ1jyVo6qU9V03Op APzh7ngLMSRupxY5+UxW5hC9ozUOSCUtfJhQ5blUOt5NNJvkF7jCr9UbT9XUJLLMSf2p Llkg== X-Gm-Message-State: ALoCoQkiEZWlnfazgVWlCtFjQgkJ5lMJAbn/ApHgH2Lmx/bGFdI1/i+2WAPNMDIX34er3uskcp6O X-Received: by 10.68.250.3 with SMTP id yy3mr5038697pbc.56.1396966305356; Tue, 08 Apr 2014 07:11:45 -0700 (PDT) Received: from [192.168.0.102] (218-164-130-74.dynamic.hinet.net. [218.164.130.74]) by mx.google.com with ESMTPSA id st4sm10869874pab.34.2014.04.08.07.11.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 08 Apr 2014 07:11:44 -0700 (PDT) Message-ID: <1396966300.14167.2.camel@phoenix> From: Axel Lin To: Mark Brown Date: Tue, 08 Apr 2014 22:11:40 +0800 In-Reply-To: <1396966233.14167.1.camel@phoenix> References: <1396966233.14167.1.camel@phoenix> X-Mailer: Evolution 3.8.4-0ubuntu1 Mime-Version: 1.0 Cc: Brian Austin , alsa-devel@alsa-project.org, Liam Girdwood , Paul Handrigan Subject: [alsa-devel] [PATCH 2/2] ASoC: cs42l73: Convert to use devm_gpio_request_one X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Current code missed a gpio_free() call in cs42l73_i2c_remove(). Convert to use devm_gpio_request_one() to fix it. Signed-off-by: Axel Lin --- sound/soc/codecs/cs42l73.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42l73.c b/sound/soc/codecs/cs42l73.c index 0ee60a1..ae37179 100644 --- a/sound/soc/codecs/cs42l73.c +++ b/sound/soc/codecs/cs42l73.c @@ -1443,8 +1443,10 @@ static int cs42l73_i2c_probe(struct i2c_client *i2c_client, i2c_set_clientdata(i2c_client, cs42l73); if (cs42l73->pdata.reset_gpio) { - ret = gpio_request_one(cs42l73->pdata.reset_gpio, - GPIOF_OUT_INIT_HIGH, "CS42L73 /RST"); + ret = devm_gpio_request_one(&i2c_client->dev, + cs42l73->pdata.reset_gpio, + GPIOF_OUT_INIT_HIGH, + "CS42L73 /RST"); if (ret < 0) { dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", cs42l73->pdata.reset_gpio, ret);