greybus: audio: Drop get_version support
This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
7ba26a8ced
commit
9937a60a06
|
@ -12,37 +12,9 @@
|
|||
#include "greybus.h"
|
||||
#include "audio.h"
|
||||
|
||||
#define GB_I2S_MGMT_VERSION_MAJOR 0x00
|
||||
#define GB_I2S_MGMT_VERSION_MINOR 0x01
|
||||
|
||||
#define GB_I2S_DATA_VERSION_MAJOR 0x00
|
||||
#define GB_I2S_DATA_VERSION_MINOR 0x01
|
||||
|
||||
/***********************************
|
||||
* GB I2S helper functions
|
||||
***********************************/
|
||||
int gb_i2s_mgmt_get_version(struct gb_connection *connection)
|
||||
{
|
||||
struct gb_protocol_version_response response;
|
||||
|
||||
memset(&response, 0, sizeof(response));
|
||||
return gb_protocol_get_version(connection,
|
||||
GB_I2S_MGMT_TYPE_PROTOCOL_VERSION,
|
||||
NULL, 0, &response,
|
||||
GB_I2S_MGMT_VERSION_MAJOR);
|
||||
}
|
||||
|
||||
int gb_i2s_data_get_version(struct gb_connection *connection)
|
||||
{
|
||||
struct gb_protocol_version_response response;
|
||||
|
||||
memset(&response, 0, sizeof(response));
|
||||
return gb_protocol_get_version(connection,
|
||||
GB_I2S_DATA_TYPE_PROTOCOL_VERSION,
|
||||
NULL, 0, &response,
|
||||
GB_I2S_DATA_VERSION_MAJOR);
|
||||
}
|
||||
|
||||
int gb_i2s_mgmt_activate_cport(struct gb_connection *connection,
|
||||
uint16_t cport)
|
||||
{
|
||||
|
|
|
@ -225,12 +225,6 @@ static int gb_i2s_transmitter_connection_init(struct gb_connection *connection)
|
|||
goto out_card;
|
||||
}
|
||||
|
||||
ret = gb_i2s_data_get_version(connection);
|
||||
if (ret) {
|
||||
pr_err("i2s data get_version() failed: %d\n", ret);
|
||||
goto out_get_ver;
|
||||
}
|
||||
|
||||
#if USE_RT5645
|
||||
rt5647_info.addr = RT5647_I2C_ADDR;
|
||||
strlcpy(rt5647_info.type, "rt5647", I2C_NAME_SIZE);
|
||||
|
@ -251,8 +245,10 @@ static int gb_i2s_transmitter_connection_init(struct gb_connection *connection)
|
|||
|
||||
return 0;
|
||||
|
||||
#if USE_RT5645
|
||||
out_get_ver:
|
||||
platform_device_unregister(&snd_dev->card);
|
||||
#endif
|
||||
out_card:
|
||||
platform_device_unregister(&snd_dev->cpu_dai);
|
||||
out_dai:
|
||||
|
@ -296,12 +292,6 @@ static int gb_i2s_mgmt_connection_init(struct gb_connection *connection)
|
|||
connection->private = snd_dev;
|
||||
spin_unlock_irqrestore(&snd_dev->lock, flags);
|
||||
|
||||
ret = gb_i2s_mgmt_get_version(connection);
|
||||
if (ret) {
|
||||
pr_err("i2s mgmt get_version() failed: %d\n", ret);
|
||||
goto err_free_snd_dev;
|
||||
}
|
||||
|
||||
ret = gb_i2s_mgmt_get_cfgs(snd_dev, connection);
|
||||
if (ret) {
|
||||
pr_err("can't get i2s configurations: %d\n", ret);
|
||||
|
|
|
@ -75,8 +75,6 @@ struct gb_snd {
|
|||
/*
|
||||
* GB I2S cmd functions
|
||||
*/
|
||||
int gb_i2s_mgmt_get_version(struct gb_connection *connection);
|
||||
int gb_i2s_data_get_version(struct gb_connection *connection);
|
||||
int gb_i2s_mgmt_activate_cport(struct gb_connection *connection,
|
||||
uint16_t cport);
|
||||
int gb_i2s_mgmt_deactivate_cport(struct gb_connection *connection,
|
||||
|
|
Loading…
Reference in New Issue