From patchwork Mon Nov 26 11:49:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13208 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id AAF4E23FC6 for ; Mon, 26 Nov 2012 11:56:48 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 3D7F2A19675 for ; Mon, 26 Nov 2012 11:56:48 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so4419020ieb.11 for ; Mon, 26 Nov 2012 03:56:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=D/AqSrO6KbqWbIzdVC4VaG7fl+yfRFZNOUgOfneX0QM=; b=EvHr9XvudFYdxHtlQNlnXMxb5jTE9+jZqpDHEmCgcMGLG8ml4QPhDE3F1Z3nCBrfTx JUeaxYlrcjzkJ2q+fDDLtJvf1CRlUtsIL2bV8pXKFpJ7w20x4L3dFCgN4rcOJ/cMSMvq TGO8YhnOGDjSKOCGyZKA3BEsrBkegEfSUl4HuAJHcCi7lPCS6vyUw5SXUbf1AzSFqqXd GZNoeYqJUHKAGQH23b/cLkANstAoIdajV+O8H9tJ6VMyOBIIzRQq39/dQdFm72mLvivV pBVp+uOGwWk+dL5dblJ4IidQi2wkK9luTIMvgUxVsNs3PKzP+8EopsyKhK0V4chpR4UI P78A== Received: by 10.50.213.69 with SMTP id nq5mr13272968igc.70.1353931008019; Mon, 26 Nov 2012 03:56:48 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp245116igt; Mon, 26 Nov 2012 03:56:47 -0800 (PST) Received: by 10.66.74.40 with SMTP id q8mr32284712pav.29.1353931007491; Mon, 26 Nov 2012 03:56:47 -0800 (PST) Received: from mail-da0-f43.google.com (mail-da0-f43.google.com [209.85.210.43]) by mx.google.com with ESMTPS id zw4si19272182pbc.304.2012.11.26.03.56.47 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Nov 2012 03:56:47 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.210.43; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.210.43 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-da0-f43.google.com with SMTP id u36so5247035dak.30 for ; Mon, 26 Nov 2012 03:56:47 -0800 (PST) Received: by 10.68.132.197 with SMTP id ow5mr37618809pbb.40.1353931007255; Mon, 26 Nov 2012 03:56:47 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id kb3sm8677482pbc.27.2012.11.26.03.56.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Nov 2012 03:56:46 -0800 (PST) From: Sachin Kamat To: alsa-devel@alsa-project.org Cc: broonie@opensource.wolfsonmicro.com, lrg@ti.com, tiwai@suse.de, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 10/14] ASoC: wm8960: Use devm_regmap_init_i2c() Date: Mon, 26 Nov 2012 17:19:43 +0530 Message-Id: <1353930587-12907-11-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1353930587-12907-1-git-send-email-sachin.kamat@linaro.org> References: <1353930587-12907-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQk0/iCDIm4uSFBK0XXjidTc3hQqIjo08R300leNIafydSu5TzRDrhdkjUJU6XL4izMpeK8c devm_regmap_init_i2c() is device managed and makes error handling and code cleanup simpler. There was no explicit regmap_exit call in this function which was probably a bug. Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm8960.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index f0f6f660..cf09cb6 100644 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -1040,7 +1040,7 @@ static __devinit int wm8960_i2c_probe(struct i2c_client *i2c, if (wm8960 == NULL) return -ENOMEM; - wm8960->regmap = regmap_init_i2c(i2c, &wm8960_regmap); + wm8960->regmap = devm_regmap_init_i2c(i2c, &wm8960_regmap); if (IS_ERR(wm8960->regmap)) return PTR_ERR(wm8960->regmap);