All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Bard Liao <bardliao@realtek.com>,
	Oder Chiou <oder_chiou@realtek.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	alsa-devel@alsa-project.org, John Keeping <john@metanate.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 3/3] ASoC: Intel: bdw-rt5677: Switch to devm_acpi_dev_add_driver_gpios()
Date: Fri,  9 Jun 2017 23:49:54 +0300	[thread overview]
Message-ID: <20170609204954.40310-3-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20170609204954.40310-1-andriy.shevchenko@linux.intel.com>

Switch to use managed variant of acpi_dev_add_driver_gpios() to simplify
error path and fix potentially wrong assingment if ->probe() fails.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 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 e3aa32c2546b..dc8d18837109 100644
--- a/sound/soc/intel/boards/bdw-rt5677.c
+++ b/sound/soc/intel/boards/bdw-rt5677.c
@@ -347,8 +347,7 @@ static int bdw_rt5677_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	}
 
-	ret = acpi_dev_add_driver_gpios(ACPI_COMPANION(&pdev->dev),
-			bdw_rt5677_gpios);
+	ret = devm_acpi_dev_add_driver_gpios(&pdev->dev, bdw_rt5677_gpios);
 	if (ret)
 		dev_warn(&pdev->dev, "Failed to add driver gpios\n");
 
-- 
2.11.0

  parent reply	other threads:[~2017-06-09 20:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-09 20:49 [PATCH v1 1/3] ASoC: rt5677: Introduce proper table for ACPI enumeration Andy Shevchenko
2017-06-09 20:49 ` [PATCH v1 2/3] ASoC: rt5677: Move platform code to board file Andy Shevchenko
2017-06-10 11:31   ` Andy Shevchenko
2017-06-09 20:49 ` Andy Shevchenko [this message]
2017-06-16 16:53 ` Applied "ASoC: rt5677: Introduce proper table for ACPI enumeration" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170609204954.40310-3-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=john@metanate.com \
    --cc=lgirdwood@gmail.com \
    --cc=oder_chiou@realtek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.