aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r--include/linux/i2c.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 7b40cda57a70..52317fb5917e 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -338,8 +338,7 @@ struct i2c_adapter {
338 void *algo_data; 338 void *algo_data;
339 339
340 /* data fields that are valid for all devices */ 340 /* data fields that are valid for all devices */
341 u8 level; /* nesting level for lockdep */ 341 struct rt_mutex bus_lock;
342 struct mutex bus_lock;
343 342
344 int timeout; /* in jiffies */ 343 int timeout; /* in jiffies */
345 int retries; 344 int retries;
@@ -367,7 +366,7 @@ static inline void i2c_set_adapdata(struct i2c_adapter *dev, void *data)
367 */ 366 */
368static inline void i2c_lock_adapter(struct i2c_adapter *adapter) 367static inline void i2c_lock_adapter(struct i2c_adapter *adapter)
369{ 368{
370 mutex_lock(&adapter->bus_lock); 369 rt_mutex_lock(&adapter->bus_lock);
371} 370}
372 371
373/** 372/**
@@ -376,7 +375,7 @@ static inline void i2c_lock_adapter(struct i2c_adapter *adapter)
376 */ 375 */
377static inline void i2c_unlock_adapter(struct i2c_adapter *adapter) 376static inline void i2c_unlock_adapter(struct i2c_adapter *adapter)
378{ 377{
379 mutex_unlock(&adapter->bus_lock); 378 rt_mutex_unlock(&adapter->bus_lock);
380} 379}
381 380
382/*flags for the client struct: */ 381/*flags for the client struct: */