greybus: audio: Drop get_version support
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 11 Aug 2015 02:06:00 +0000 (07:36 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 12 Aug 2015 02:33:05 +0000 (19:33 -0700)
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>
drivers/staging/greybus/audio-gb-cmds.c
drivers/staging/greybus/audio.c
drivers/staging/greybus/audio.h

index 10de34d6fa93805b7e6cee863644a5556ffe09b6..112aed994fd260153a76d3f9299c38e50d3e9d0a 100644 (file)
 #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)
 {
index 0e9bec5089b2959a30a114ac7bb78a3db0319c7a..6754c907cd6ef9bb84b1291f6912ada33b716db2 100644 (file)
@@ -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);
index da95c1b3cb1e9777abceb370292ba1e70b96d377..e4975930f29ad7c576d2b4f68d86b3c6798a9e81 100644 (file)
@@ -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,