Messages in this thread |  | | Date | Mon, 3 May 2010 00:12:20 +0400 | | From | Anton Vorontsov <> | | Subject | Re: [PATCH v3] ds2782_battery: add support for ds2786 battery gas gauge |
| |
On Mon, Apr 26, 2010 at 10:39:41PM +0300, Mike Rapoport wrote: > On Mon, Apr 26, 2010 at 9:22 PM, Anton Vorontsov <cbouatmailru@gmail.com> wrote: > > > > Btw, I don't quite like the 'if (id->driver_data == 1)' stuff. > > How about the following patch on top? > > > > From acf917d3880465b76875f671ee450a8fdff62c9f Mon Sep 17 00:00:00 2001 > > From: Anton Vorontsov <cbouatmailru@gmail.com> > > Date: Mon, 26 Apr 2010 22:10:52 +0400 > > Subject: [PATCH] ds2782_battery: Get rid of magic numbers in driver_data > > > > Constructions like 'if (id->driver_data == 1)' look quite weird. > > This patch introduces 'enum ds278x_num_id', which makes things > > much more understandable, i.e. 'if (id->driver_data == DS2786)'. > > agree > > > Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> > > Acked-by: Mike Rapoport <mike@compulab.co.il>
Thanks! Applied.
-- Anton Vorontsov email: cbouatmailru@gmail.com irc://irc.freenode.net/bd2
|  |