From b7e7dc0083d662c061dcd547c7dde4db24331ebc Mon Sep 17 00:00:00 2001 From: Vaibhav Agarwal Date: Thu, 4 Aug 2016 15:14:34 +0530 Subject: [PATCH] greybus: audio: Add id to identify data connection Added id field to data connection struct. This is used to identify which data connection to use while enabling interface between module & APB. Signed-off-by: Vaibhav Agarwal Reviewed-by: Mark Greer Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/audio_codec.h | 1 + drivers/staging/greybus/audio_module.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/staging/greybus/audio_codec.h b/drivers/staging/greybus/audio_codec.h index c5a8808108db..8cd5bd7a6c31 100644 --- a/drivers/staging/greybus/audio_codec.h +++ b/drivers/staging/greybus/audio_codec.h @@ -129,6 +129,7 @@ struct gbaudio_control { }; struct gbaudio_data_connection { + int id; __le16 data_cport; int cport_configured; char name[NAME_SIZE]; diff --git a/drivers/staging/greybus/audio_module.c b/drivers/staging/greybus/audio_module.c index 7cf523e7f995..9632bc119f87 100644 --- a/drivers/staging/greybus/audio_module.c +++ b/drivers/staging/greybus/audio_module.c @@ -199,6 +199,7 @@ static int gb_audio_add_data_connection(struct gbaudio_module_info *gbmodule, greybus_set_drvdata(bundle, gbmodule); /* dai->name should be same as codec->dai_name */ strlcpy(dai->name, "greybus-apb1", NAME_SIZE); + dai->id = 0; dai->data_cport = connection->intf_cport_id; dai->connection = connection; list_add(&dai->list, &gbmodule->data_list); -- 2.39.5