greybus: audio: Avoid reporting spurious button events
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Thu, 1 Sep 2016 06:08:42 +0000 (11:38 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 2 Sep 2016 12:13:39 +0000 (14:13 +0200)
commit6a57ddc97acb2a1d37ce94a237dc0fab2e5a3f5b
treeaf00489278feb104a7df3942716f8dee3448fbfb
parentcec89df44692fa8cff2a52542b11878ee49b0d69
greybus: audio: Avoid reporting spurious button events

Now jack-button are registered to snd framework based on capabilities
populated by codec module's topology data. Thus, valid ids for button
events can also vary for different modules. This patch modifies existing
button reporting mechanism to avoid reporting spurious button events for
invalid button ids.

Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/audio_module.c