lkml.org 
[lkml]   [2006]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [i2c] [PATCH] I2C bus driver for Philips ARM boards
On Thu, Jun 22, 2006 at 03:31:46PM +0400, Vitaly Wool wrote:
> +static inline int i2c_pnx_bus_busy(volatile struct i2c_regs *master)
> +{
> + long timeout;
> +
> + timeout = TIMEOUT * 10000;
> + if (timeout > 0 && (master->sts & mstatus_active)) {

Please use the proper ioread() function to read from memory, and don't
rely on a memory mapped structure. Linux does this in order to work for
all platforms.

A big hint about this, if you have volatile in your driver, it's
wrong...

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/

\
 
 \ /
  Last update: 2006-06-22 20:45    [W:0.058 / U:0.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site