i2c-dev: Clarify the unit of ioctl I2C_TIMEOUT

The unit in which user-space can set the bus timeout value is jiffies
for historical reasons (back when HZ was always 100.) This is however
not good because user-space doesn't know how long a jiffy lasts. The
timeout value should instead be set in a fixed time unit. Given the
original value of HZ, this unit should be 10 ms, for compatibility.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
This commit is contained in:
Jean Delvare
2009-02-24 19:19:49 +01:00
parent a746b578d8
commit cd97f39b7c
3 changed files with 7 additions and 3 deletions

View File

@ -361,7 +361,7 @@ struct i2c_adapter {
struct mutex bus_lock;
struct mutex clist_lock;
int timeout;
int timeout; /* in jiffies */
int retries;
struct device dev; /* the adapter device */