From patchwork Tue Apr 8 14:10:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3952321 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2FF9BBFF02 for ; Wed, 9 Apr 2014 03:45:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6CEE0205FC for ; Wed, 9 Apr 2014 03:45:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 9AFEE204FB for ; Wed, 9 Apr 2014 03:45:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id F3298265692; Wed, 9 Apr 2014 05:45:18 +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 61843266D02; Wed, 9 Apr 2014 01:05:26 +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 4FDC7266D02; Wed, 9 Apr 2014 01:05:25 +0200 (CEST) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) by alsa0.perex.cz (Postfix) with ESMTP id 3E1B6268105 for ; Tue, 8 Apr 2014 16:10:40 +0200 (CEST) Received: by mail-pb0-f45.google.com with SMTP id uo5so1077785pbc.18 for ; Tue, 08 Apr 2014 07:10:38 -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:content-type :mime-version:content-transfer-encoding; bh=om6RgrnSt9zN2rfEEuFkLiNnVIeN7f6seNv76NLJuwI=; b=aEuH+l1lqEaheoVTHqQsoXC3WX6Q4aZxW727xNLkTAVhs/6XPX4FUZZ8Nrj1kXigMY +8YpLuBiOrWEZR8GTLDEMfOUiR6IdeZV49CLKDKAOcD27W6hx9yEJKllE46zCfUmaAGH 0H1o5Yc+oSsgByPLzD2MW9Ij6bMLtwXaaE+YDEntv46Z8yMzJNiw3Rj53jrLYFaGCWOk Y6ZJQ/HhBax5d+LYMzL7AlmCNzaze0f8Ckm+WSD5fZhQuiYOCk94t5iwQAtI7YRXajlJ Y37WyW55qKNYYA3UiH3aydJkCUv+YxBamzyDTI+w/zciT0yN3/0N7nEg1Fo+uBF9Xsgu NNfA== X-Gm-Message-State: ALoCoQldS3ybvxswCjmFVWFZTEyYYi7+yAjiyQVy72fRVykmC+v+a2OdEqmZXRlOeNfuN7cdN8fr X-Received: by 10.68.254.103 with SMTP id ah7mr4775990pbd.159.1396966238268; Tue, 08 Apr 2014 07:10:38 -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 pl10sm4891872pbb.56.2014.04.08.07.10.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 08 Apr 2014 07:10:37 -0700 (PDT) Message-ID: <1396966233.14167.1.camel@phoenix> From: Axel Lin To: Mark Brown Date: Tue, 08 Apr 2014 22:10:33 +0800 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 1/2] ASoC: cs42l52: 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 cs42l52_i2c_remove(). Convert to use devm_gpio_request_one() to fix it. Signed-off-by: Axel Lin --- sound/soc/codecs/cs42l52.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs42l52.c b/sound/soc/codecs/cs42l52.c index 460d355..2213a03 100644 --- a/sound/soc/codecs/cs42l52.c +++ b/sound/soc/codecs/cs42l52.c @@ -1229,8 +1229,10 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client, } if (cs42l52->pdata.reset_gpio) { - ret = gpio_request_one(cs42l52->pdata.reset_gpio, - GPIOF_OUT_INIT_HIGH, "CS42L52 /RST"); + ret = devm_gpio_request_one(&i2c_client->dev, + cs42l52->pdata.reset_gpio, + GPIOF_OUT_INIT_HIGH, + "CS42L52 /RST"); if (ret < 0) { dev_err(&i2c_client->dev, "Failed to request /RST %d: %d\n", cs42l52->pdata.reset_gpio, ret);