From 9937a60a06ea21acc6680615258109a417ed25a8 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Tue, 11 Aug 2015 07:36:00 +0530 Subject: [PATCH] greybus: audio: Drop get_version support This is done from a common place now, no need to replicate it. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/audio-gb-cmds.c | 28 ------------------------- drivers/staging/greybus/audio.c | 14 ++----------- drivers/staging/greybus/audio.h | 2 -- 3 files changed, 2 insertions(+), 42 deletions(-) diff --git a/drivers/staging/greybus/audio-gb-cmds.c b/drivers/staging/greybus/audio-gb-cmds.c index 10de34d6fa93..112aed994fd2 100644 --- a/drivers/staging/greybus/audio-gb-cmds.c +++ b/drivers/staging/greybus/audio-gb-cmds.c @@ -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) { diff --git a/drivers/staging/greybus/audio.c b/drivers/staging/greybus/audio.c index 0e9bec5089b2..6754c907cd6e 100644 --- a/drivers/staging/greybus/audio.c +++ b/drivers/staging/greybus/audio.c @@ -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); diff --git a/drivers/staging/greybus/audio.h b/drivers/staging/greybus/audio.h index da95c1b3cb1e..e4975930f29a 100644 --- a/drivers/staging/greybus/audio.h +++ b/drivers/staging/greybus/audio.h @@ -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, -- 2.39.5