Re: [PATCH] mfd: tps6586x: Invert GPIO and subdevicesinitialization

From: Samuel Ortiz
Date: Sun Jan 30 2011 - 18:37:58 EST


Hi Vincent,

On Wed, Jan 19, 2011 at 09:52:09AM -0500, Vincent Palatin wrote:
> When using a fixed voltage regulator triggered by a TPS6586x GPIO,
> this allows to declare and initialize it conveniently from the "subdev" list.
>
> Signed-off-by: Vincent Palatin <vpalatin@xxxxxxxxxxxx>
> ---
> drivers/mfd/tps6586x.c | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c
> index 627cf57..fdb16ed 100644
> --- a/drivers/mfd/tps6586x.c
> +++ b/drivers/mfd/tps6586x.c
> @@ -517,19 +517,25 @@ static int __devinit tps6586x_i2c_probe(struct i2c_client *client,
> }
> }
>
> + tps6586x_gpio_init(tps6586x, pdata->gpio_base);
> +
Wouldn't it make sense to have tps6586x_gpio_init() return an int and check it
before adding the subdevs then ?

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
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/