From patchwork Thu Jun 15 12:46:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9788793 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7ACCD60384 for ; Thu, 15 Jun 2017 12:49:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C67E284DB for ; Thu, 15 Jun 2017 12:49:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5FAAF285C2; Thu, 15 Jun 2017 12:49:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C046A284DB for ; Thu, 15 Jun 2017 12:49:07 +0000 (UTC) Received: from alsa.alsa-project.org (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 2B3C82673BE; Thu, 15 Jun 2017 14:48:01 +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 7A548266A56; Thu, 15 Jun 2017 14:47:17 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by alsa0.perex.cz (Postfix) with ESMTP id C6B76266819 for ; Thu, 15 Jun 2017 14:47:12 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP; 15 Jun 2017 05:47:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,343,1493708400"; d="scan'208";a="981187829" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 15 Jun 2017 05:47:09 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 0911F27E; Thu, 15 Jun 2017 15:46:39 +0300 (EEST) From: Andy Shevchenko To: Bard Liao , Oder Chiou , Liam Girdwood , Mark Brown , alsa-devel@alsa-project.org, John Keeping Date: Thu, 15 Jun 2017 15:46:38 +0300 Message-Id: <20170615124638.65971-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170615124638.65971-1-andriy.shevchenko@linux.intel.com> References: <20170615124638.65971-1-andriy.shevchenko@linux.intel.com> Cc: Andy Shevchenko Subject: [alsa-devel] [PATCH v2 3/3] ASoC: Intel: bdw-rt5677: Switch to devm_acpi_dev_add_driver_gpios() 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify error path and fix potentially wrong assignment if ->probe() fails. Signed-off-by: Andy Shevchenko --- sound/soc/intel/boards/bdw-rt5677.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/intel/boards/bdw-rt5677.c b/sound/soc/intel/boards/bdw-rt5677.c index bb98e94dd6f9..058b8ccedf02 100644 --- a/sound/soc/intel/boards/bdw-rt5677.c +++ b/sound/soc/intel/boards/bdw-rt5677.c @@ -207,8 +207,7 @@ static int bdw_rt5677_init(struct snd_soc_pcm_runtime *rtd) struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); int ret; - ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(codec->dev), - bdw_rt5677_gpios); + ret = devm_acpi_dev_add_driver_gpios(codec->dev, bdw_rt5677_gpios); if (ret) dev_warn(codec->dev, "Failed to add driver gpios\n");