Skip to content

Commit

Permalink
greybus: audio: Use standard API to set connections' private data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vaibhav Agarwal authored and Greg Kroah-Hartman committed May 4, 2016
1 parent c188fdc commit 0634874
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/greybus/audio_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0634874

Please sign in to comment.