Re: [PATCH v3] ds2782_battery: add support for ds2786 battery gasgauge

From: Anton Vorontsov
Date: Sun May 02 2010 - 16:12:33 EST


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@xxxxxxxxx> 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@xxxxxxxxx>
> > 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@xxxxxxxxx>
>
> Acked-by: Mike Rapoport <mike@xxxxxxxxxxxxxx>

Thanks! Applied.

--
Anton Vorontsov
email: cbouatmailru@xxxxxxxxx
irc://irc.freenode.net/bd2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/