Re: [PATCH 1/3] mfd: add LP3943 MFD driver

From: Lee Jones
Date: Mon Jul 22 2013 - 03:48:37 EST


> > > +int lp3943_read_byte(struct lp3943 *l, u8 reg, u8 *read)
> >
> > Not sure I like 'l' as a variable name. The function is small enough
> > to get away with it in this context, but it would probably be better
> > if it were renamed to something more meaningful.
>
> LP3943 consists of two devices - GPIO and PWM drivers.
> So each private data was defined as
>
> struct lp3943 *l; /* MFD device */
> struct lp3943_gpio *lg; /* GPIO driver */
> struct lp3943_pwm *lp; /* PWM driver */
>
> As you pointed, the 'l' may look like a list of something.
> I'll rename them as below.
>
> struct lp3943 *lp3943;
> struct lp3943_gpio *lp3943_gpio;
> struct lp3943_pwm *lp3943_pwm;

Much better thanks.

> > > +static const struct i2c_device_id lp3943_ids[] = {
> > > + {"lp3943", 0},
> >
> > Lack of consistency ...
>
> I don't know exactly what it means. Do you mean the name of I2C device?

No, I was referencing the spaces (or lack of) on the inside of the
curly brackets.

--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org â Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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/