[lm-sensors] [PATCH] hwmon: (max1111) Avoid extra memory allocations

Jean Delvare khali at linux-fr.org
Tue Jul 12 18:45:22 CEST 2011


On Tue, 12 Jul 2011 09:40:33 -0700, Guenter Roeck wrote:
> On Tue, Jul 12, 2011 at 05:01:52AM -0400, Jean Delvare wrote:
> > We can allocate the tx and rx buffers as part of our data structure.
> > Doing so is faster and spares memory.
> > 
> > Signed-off-by: Jean Delvare <khali at linux-fr.org>
> > ---
> > Can anyone with a MAX1111 device try and report please?
> > 
> Reason for using allocated buffers may have been to ensure (word/cache line) alignment.
> Not really sure if that is a valid argument with 1/2 byte buffers, though.

And such an alignment would belong to the bus driver rather than the
SPI device driver. At least this is the way we do it for I2C...

-- 
Jean Delvare



More information about the lm-sensors mailing list