greybus: audio: Enable codec module detection on different slots
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Wed, 13 Jan 2016 21:07:56 +0000 (14:07 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 14 Jan 2016 00:49:32 +0000 (16:49 -0800)
commit83ec628386aee5e14fe1be3e27e84124dfa7b165
tree699d844af38f12f4a5dce568ad6004b4c40e94ac
parent25de3491f11064845a45606fa5828a200ecf8c53
greybus: audio: Enable codec module detection on different slots

driver_name associated with dev_name was hard coded earlier.
This limits, audio codec module to be detected on Port#5 only.

Now, driver_name is generated dynamically based on dev_name.
This enables codec module detection on any 1x2 slot.

Also, Update dev_id based on slot number, instead of bundle->id.
bundle->id is not unique for multiple modules added, thus now
using slot number for unique identification.

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>
drivers/staging/greybus/audio_codec.c