summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/audio_codec.c
diff options
context:
space:
mode:
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>2016-01-21 22:33:13 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-21 23:48:37 -0800
commita547deb5105b583138e74e882b1e2aae1f76dc9c (patch)
treee219e23b19d17bff923fcd0cae9e8c0f637e114a /drivers/staging/greybus/audio_codec.c
parent8eff5109616f4fb1784aa311b7544ef29b8deae9 (diff)
downloadop-kernel-dev-a547deb5105b583138e74e882b1e2aae1f76dc9c.zip
op-kernel-dev-a547deb5105b583138e74e882b1e2aae1f76dc9c.tar.gz
greybus: audio_codec: update codec_name as per driver->name
Originally, driver->name was not poluated from GB and thus manually set from audio_codec driver as a hack. This is no more required. Another patch already removes that hack. Now, with new driver->name as "legacy.<id-bundle.interface>" codec is registered with different name. So, during DAI link registration as well it needs modification. Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/audio_codec.c')
-rw-r--r--drivers/staging/greybus/audio_codec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/greybus/audio_codec.c b/drivers/staging/greybus/audio_codec.c
index 5c02b65..1f39c9c 100644
--- a/drivers/staging/greybus/audio_codec.c
+++ b/drivers/staging/greybus/audio_codec.c
@@ -541,7 +541,8 @@ static struct gbaudio_codec_info *gbaudio_get_codec(struct device *dev,
gbcodec->dev_id = dev_id;
dev_set_drvdata(dev, gbcodec);
gbcodec->dev = dev;
- strlcpy(gbcodec->name, dev_name(dev), NAME_SIZE);
+ snprintf(gbcodec->name, NAME_SIZE, "%s.%s", dev->driver->name,
+ dev_name(dev));
mutex_lock(&gb_codec_list_lock);
list_add(&gbcodec->list, &gb_codec_list);
OpenPOWER on IntegriCloud