greybus: battery: 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
9937a60a06
commit
f8cbc30de0
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user