Re: [PATCH 4/4] Input: synaptics-rmi4 - switch to usingi2c_transfer()

From: Dmitry Torokhov
Date: Thu Jan 16 2014 - 19:35:45 EST


On Tue, Jan 14, 2014 at 12:26:47AM -0800, Christopher Heiny wrote:
> On 01/09/2014 11:44 PM, Dmitry Torokhov wrote:
> >
> >- dev_dbg(&client->dev, "writes 1 bytes: %02x\n", txbuf[0]);
> >+ retval = i2c_transfer(client->adapter, msgs, sizeof(msgs));
> >+ if (retval == sizeof(msgs))
>
> I think this should be:
> retval = i2c_transfer(client->adapter, msgs, ARRAY_SIZE(msgs));
> if (retval == ARRAY_SIZE(msgs))
> At least, that change resolved some random misbehaviors, including
> kernel panics.

You are absolutely right, I just committed a fix for that.

Thanks.

--
Dmitry
--
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/