diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-06-15 15:46:38 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-06-16 19:53:25 +0300 |
commit | 0931352dcb4d2019bf1ec2a5457a41d1d6566509 (patch) | |
tree | 325a7ad07dda71e66ac1128c673eab91cfd7008d /sound/soc/intel/boards/bdw-rt5677.c | |
parent | 1a019f3a888fd876474c8ed268a558520038af3f (diff) | |
download | linux-0931352dcb4d2019bf1ec2a5457a41d1d6566509.tar.xz |
ASoC: Intel: bdw-rt5677: Switch to devm_acpi_dev_add_driver_gpios()
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 <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel/boards/bdw-rt5677.c')
-rw-r--r-- | sound/soc/intel/boards/bdw-rt5677.c | 3 |
1 files changed, 1 insertions, 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"); |