lkml.org 
[lkml]   [2010]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2010-05-02 22:15    [W:0.036 / U:1.896 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site