]> git.karo-electronics.de Git - linux-beck.git/commitdiff
greybus: audio: Add id to identify data connection
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Thu, 4 Aug 2016 09:44:34 +0000 (15:14 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Thu, 4 Aug 2016 17:07:30 +0000 (19:07 +0200)
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 <vaibhav.agarwal@linaro.org>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/audio_codec.h
drivers/staging/greybus/audio_module.c

index c5a8808108db3800b2a55a3237134df8bc5d2632..8cd5bd7a6c3130e56e32cf2b4f3447e7568a92db 100644 (file)
@@ -129,6 +129,7 @@ struct gbaudio_control {
 };
 
 struct gbaudio_data_connection {
+       int id;
        __le16 data_cport;
        int cport_configured;
        char name[NAME_SIZE];
index 7cf523e7f995e0cf884256a0f8f99e3b537fa14c..9632bc119f87e793a4833be8fb902e0ef1a63ae5 100644 (file)
@@ -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);