greybus: battery: Drop get_version support
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 11 Aug 2015 02:06:01 +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/battery.c

index 43799a357addb09cb88473f5bcd3f9b9cab4963f..a56eb81b23862a29d9b5d502dbe61be5ec09fe92 100644 (file)
@@ -32,8 +32,6 @@ struct gb_battery {
        // updates from the SVC "on the fly" so we don't have to always go ask
        // the battery for some information.  Hopefully...
        struct gb_connection *connection;
-       u8 version_major;
-       u8 version_minor;
 
 };
 
@@ -42,8 +40,6 @@ struct gb_battery {
 #define        GB_BATTERY_VERSION_MINOR                0x01
 
 /* Greybus battery request types */
-#define        GB_BATTERY_TYPE_INVALID                 0x00
-#define        GB_BATTERY_TYPE_PROTOCOL_VERSION        0x01
 #define        GB_BATTERY_TYPE_TECHNOLOGY              0x02
 #define        GB_BATTERY_TYPE_STATUS                  0x03
 #define        GB_BATTERY_TYPE_MAX_VOLTAGE             0x04
@@ -94,9 +90,6 @@ struct gb_battery_voltage_response {
        __le32  voltage;
 };
 
-/* Define get_version() routine */
-define_get_version(gb_battery, BATTERY);
-
 static int get_tech(struct gb_battery *gb)
 {
        struct gb_battery_technology_response tech_response;
@@ -345,12 +338,7 @@ static int gb_battery_connection_init(struct gb_connection *connection)
        gb->connection = connection;
        connection->private = gb;
 
-       /* Check the version */
-       retval = get_version(gb);
-       if (retval)
-               goto out;
        retval = init_and_register(connection, gb);
-out:
        if (retval)
                kfree(gb);