[i2c] [PATCHv2 3/3] Add platform driver on top of the new pca-algorithm

Wolfram Sang w.sang at pengutronix.de
Sun Mar 16 15:28:34 CET 2008


On Fri, Mar 14, 2008 at 07:46:28PM +0100, Jean Delvare wrote:

> > +	/* Use gpio_is_valid() when in mainline */
> > +	if (i2c->gpio > -1)
> > +		ret = gpio_request(i2c->gpio, i2c->adap.name);
> > +		if (ret == 0) {
> > +			gpio_direction_output(i2c->gpio, 1);
> > +			i2c->algo_data.reset_chip = i2c_pca_pf_resetchip;
> > +		} else {
> > +			printk(KERN_WARNING "%s: Registering gpio failed!\n",
> > +				i2c->adap.name);
> > +			i2c->gpio = ret;
> > +		}
> 
> You're missing curly braces around this block, aren't you?
Holy ..., yes, you are right. This is why I used to have braces even
around single instructions after if. This is, where CodingStyle gives me
most trouble.

> The rest looks OK, so I can fix this myself and queue up your patch for
> 2.6.26.
Ah, finally! \o/ Thanks a _lot_ for your help, I learnt a lot and this
will hopefully show in my next submission :)

Best wishes,

   Wolfram

-- 
  Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.lm-sensors.org/pipermail/i2c/attachments/20080316/351e0211/attachment.bin 


More information about the i2c mailing list