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>
struct gb_i2c_device {
struct gb_connection *connection;
- u8 version_major;
- u8 version_minor;
u32 functionality;
u16 timeout_msec;
struct i2c_adapter adapter;
};
-/* Define get_version() routine */
-define_get_version(gb_i2c_device, I2C);
-
/*
* Map Greybus i2c functionality bits into Linux ones
*/
{
int ret;
- /* First thing we need to do is check the version */
- ret = get_version(gb_i2c_dev);
- if (ret)
- return ret;
-
/* Assume the functionality never changes, just get it once */
ret = gb_i2c_functionality_operation(gb_i2c_dev);
if (ret)