On Tue, Jul 15, 2003 at 02:20:57PM +0200, Michael Hunold wrote:
> +
> +/////////////////////////////////////////////////////////////////////
> +// register functions
> +/////////////////////////////////////////////////////////////////////
> +
> +void WriteRegDW(struct adapter *adapter, u32 reg, u32 value)
Hm, this really isn't the proper Linux coding style. Please read
Documentation/CodingStyle on how to name functions.
> +{
> + u32 flags;
flags has to be a unsigned long.
> +
> + save_flags(flags);
> + cli();
Huh? Did you even compile this on a SMP kernel on 2.5? (Hint, it will
not...) Please fix this up.
> +u32 ReadRegDW(struct adapter *adapter, u32 reg)
> +{
> + return readl(adapter->io_mem + reg);
> +}
Why? Why not just write the readl() function whereever you call
ReadRegDW?
> +/////////////////////////////////////////////////////////////////////
> +// I2C
> +////////////////////////////////////////////////////////////////////
> +
> +u32 i2cMainWriteForFlex2(struct adapter * adapter, u32 command, u8 * buf, u32 retries)
kernel functions traditionally return an int. A negative number if
there is an error, and 0 if there isn't.
Oh, any reason for not tying this to the existing i2c core?
Or is that done somewhere else?
thanks,
greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Jul 15 2003 - 22:01:01 EST