summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/audio_codec.h
diff options
context:
space:
mode:
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>2016-01-14 00:07:55 +0300
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-14 03:48:49 +0300
commit25de3491f11064845a45606fa5828a200ecf8c53 (patch)
treefd2a2f106c0ed47960735bb547f3857cf6262848 /drivers/staging/greybus/audio_codec.h
parent538ecb5a05049fcd23043ed5c97e42c379e5ccb0 (diff)
downloadlinux-25de3491f11064845a45606fa5828a200ecf8c53.tar.xz
greybus: audio: Cleanup GB protocol connections in case of abrupt codec removal
We need to clean up GB protocl connections, otherwise successive codec insertions fails repeatedly. NOTE: As per suggestion, since codec is already removed, one should not trigger any GB command. It'll cause a delay of atleast TIMEOUT value. HOwever, failing to cleanup GB protocol, causes successive module insertion to fail Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Signed-off-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/audio_codec.h')
-rw-r--r--drivers/staging/greybus/audio_codec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h
index fcf3a0602176..0b587ef74d16 100644
--- a/drivers/staging/greybus/audio_codec.h
+++ b/drivers/staging/greybus/audio_codec.h
@@ -131,6 +131,9 @@ struct gbaudio_codec_info {
struct snd_soc_dapm_route *routes;
struct snd_soc_dai_driver *dais;
+ /* codec users */
+ atomic_t users;
+
/* lists */
struct list_head dai_list;
struct list_head widget_list;