greybus: audio: Use standard API to set connections' private data
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Wed, 4 May 2016 10:59:24 +0000 (16:29 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 4 May 2016 18:30:20 +0000 (11:30 -0700)
Use standard API greybus_set_drvdata() while setting private
data pointers for mgmt & data connection.

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

index 27e5ff19dca6521cb03b0cd003e2cf09d0cd81d4..d2dd5b82ce41ef5aadc9ba91046dcae11d9102e6 100644 (file)
@@ -173,7 +173,7 @@ static int gb_audio_add_mgmt_connection(struct gbaudio_module_info *gbmodule,
        if (IS_ERR(connection))
                return PTR_ERR(connection);
 
-       connection->private = gbmodule;
+       greybus_set_drvdata(bundle, gbmodule);
        gbmodule->mgmt_connection = connection;
 
        return 0;
@@ -201,7 +201,7 @@ static int gb_audio_add_data_connection(struct gbaudio_module_info *gbmodule,
                return PTR_ERR(connection);
        }
 
-       connection->private = gbmodule;
+       greybus_set_drvdata(bundle, gbmodule);
        /* dai->name should be same as codec->dai_name */
        strlcpy(dai->name, "greybus-apb1", NAME_SIZE);
        dai->data_cport = connection->intf_cport_id;