greybus: Merge branch 'gregkh_work' into master
authorGreg Kroah-Hartman <greg@kroah.com>
Tue, 21 Oct 2014 06:37:44 +0000 (14:37 +0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 21 Oct 2014 06:37:44 +0000 (14:37 +0800)
This pulls in the battery driver work I did there.

1  2 
drivers/staging/greybus/battery-gb.c

index a3b2bee77299644f3b120eabb567a5d199648414,eca1d094870544420b9cec16d0758d63fb3cc261..03c16f7a5301a1b2699ef84fc972698850707b38
@@@ -125,8 -325,14 +325,15 @@@ int gb_battery_device_init(struct gb_co
                return -ENOMEM;
  
        gb->connection = connection;    // FIXME refcount!
 +      connection->private = gb;
  
+       /* Check the version */
+       retval = get_version(gb);
+       if (retval) {
+               kfree(gb);
+               return retval;
+       }
        b = &gb->bat;
        // FIXME - get a better (i.e. unique) name
        // FIXME - anything else needs to be set?