Richard Röjfors wrote: > Ben Dooks wrote: >> On Sun, Jan 24, 2010 at 06:33:20PM +0100, Richard R?jfors wrote: >>>>> + >>>>> +#define XIIC_MSB_OFFSET 0 >>>>> +#define XIIC_REG_OFFSET (0x100+XIIC_MSB_OFFSET) >>>> givevn you're running everything through indirect read/write calls, >>>> how about doing it in there? >>> Could do, bad thing is that it would add in an addition during runtime >>> rather than having the C preprocessor doing it. >>> >>> I think I would like to leave it as is. >>> >>> What do you think? >> Compilers aren't that stupid nowadays, they can generally sort this >> thing out at compile time, esepcially with inline code. Try it and >> see what happens... > > If a constant value needs to be added to the sum of two input parameters of a function, I don's see > any option for the compiler but add it runtime. Ah, we can not add in the offset in the read/write functions. Because all registers are not offset:ed. (The interrupt registers registered further down). I will post an updated patch shortly. Thanks for the feedback. --Richard -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html