]> asedeno.scripts.mit.edu Git - linux.git/commit
ASoC: jack: Manage gpios via devres
authorTakashi Iwai <tiwai@suse.de>
Tue, 22 Aug 2017 11:59:44 +0000 (13:59 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 22 Aug 2017 12:38:35 +0000 (13:38 +0100)
commitbd29ae969042c87413157c02d4f2a787d0212da3
tree2780978ae938a2f83e385e37892fac79b6e0bfd6
parent77a4525bc282b7072ebda5d6f6925ca6d604a16f
ASoC: jack: Manage gpios via devres

Let's be lazy -- this patch adds the devres code to
snd_soc_jack_add_gpios() for releasing the gpio resources at device
removal automagically.  After this patch, you don't have to call
snd_soc_jack_free_gpios() manually as long as it's managed from the
machine driver.

What about the gpios assigned in other levels?  Well, you might still
need to free the resources manually, depending on how the component
unbind works.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-jack.c