Re: [PATCH 2/2] mfd: Add WM831x SPI support

From: Mark Brown
Date: Tue Oct 19 2010 - 05:54:33 EST


On Tue, Oct 19, 2010 at 11:44:23AM +0200, Samuel Ortiz wrote:

> > +static int wm831x_spi_write_device(struct wm831x *wm831x, unsigned short reg,
> > + int bytes, void *src)
> > +{
> > + struct spi_device *spi = wm831x->control_data;
> > + u16 *s = src;
> > + u16 data[2];
> > + int ret;
> > +
> > + /* Go register at a time */
> > + for (r = reg; r < reg + (bytes / 2); r++) {
> > + data[0] = r;

Oh, gah. We need an extra int r here, I've obviously stuffed up the
move from the BSP I was working on. Sorry about that: