From patchwork Mon Nov 26 11:49:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 13199 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 17E5923FC6 for ; Mon, 26 Nov 2012 11:56:19 +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 BB5E4A18312 for ; Mon, 26 Nov 2012 11:56:18 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id c10so4419020ieb.11 for ; Mon, 26 Nov 2012 03:56:18 -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=7tNPe0ZhGOdiwvVZvCt/p9sQIoQSSWIzWCHSCDuDGZQ=; b=G3FP33fRs2yCj812JYz8sj55viNsMOpMCHHt4RovX+mH/lF9jq21afvcdxDIeonjNd kjdvkaccnrPx+2w7DUAtaNsmxGrqhtLznRx0nzPrSP607tzPsIHS4phOmGOKeUUN5+op /kFNro5BGJTj0yQS9KG9k9NAyVA2WonChrf7h+/JDhhEfs4Jtsl17XkQFFSvooxrk8hn TU1u2xHHZrKpX4L6ooSX0bp6My63GGzm3fKfZ4+3rANkc05zcjWq8xVdR1K4EYMeh+k1 Tkh3JfqychxukCiLEsieYp/hHPsAKNyltqr1bDGTkmREAoe90CUmJ1Qg9FP40CzNwrj0 tRQg== Received: by 10.50.152.137 with SMTP id uy9mr10574461igb.62.1353930978214; Mon, 26 Nov 2012 03:56:18 -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 n20csp245057igt; Mon, 26 Nov 2012 03:56:17 -0800 (PST) Received: by 10.66.90.101 with SMTP id bv5mr32128345pab.42.1353930977507; Mon, 26 Nov 2012 03:56:17 -0800 (PST) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id zz3si19263325pbc.331.2012.11.26.03.56.17 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Nov 2012 03:56:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 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-pb0-f50.google.com with SMTP id wz7so5763019pbc.9 for ; Mon, 26 Nov 2012 03:56:17 -0800 (PST) Received: by 10.68.234.167 with SMTP id uf7mr36930667pbc.20.1353930977249; Mon, 26 Nov 2012 03:56:17 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id kb3sm8677482pbc.27.2012.11.26.03.56.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 26 Nov 2012 03:56:16 -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 01/14] ASoC: wm8350: Use devm_regulator_bulk_get Date: Mon, 26 Nov 2012 17:19:34 +0530 Message-Id: <1353930587-12907-2-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: ALoCoQkTocY8LvDXaxLmXuyT1mW70a1FtA+MIPvRickrRWZA8sdqK3xXC5kLO08EbA5PFONjzTIJ devm_regulator_bulk_get() is device managed and makes error handling and code cleanup simpler. Signed-off-by: Sachin Kamat --- sound/soc/codecs/wm8350.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c index a4cae06..32b8f08 100644 --- a/sound/soc/codecs/wm8350.c +++ b/sound/soc/codecs/wm8350.c @@ -1500,7 +1500,7 @@ static int wm8350_codec_probe(struct snd_soc_codec *codec) for (i = 0; i < ARRAY_SIZE(supply_names); i++) priv->supplies[i].supply = supply_names[i]; - ret = regulator_bulk_get(wm8350->dev, ARRAY_SIZE(priv->supplies), + ret = devm_regulator_bulk_get(wm8350->dev, ARRAY_SIZE(priv->supplies), priv->supplies); if (ret != 0) return ret; @@ -1607,8 +1607,6 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec) wm8350_clear_bits(wm8350, WM8350_POWER_MGMT_5, WM8350_CODEC_ENA); - regulator_bulk_free(ARRAY_SIZE(priv->supplies), priv->supplies); - return 0; }