Changeset 5570 for i2c/trunk/kernel/i2c-core.c
- Timestamp:
- 12/15/08 13:45:58 (3 years ago)
- Files:
-
- 1 modified
-
i2c/trunk/kernel/i2c-core.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
i2c/trunk/kernel/i2c-core.c
r4245 r5570 36 36 /* ----- global defines ---------------------------------------------------- */ 37 37 38 #if I2C_LINUX_2_4_BINARY_COMPATIBILITY 39 #define I2C_LOCK_LIST(adap) down(&adap->bus) 40 #define I2C_UNLOCK_LIST(adap) up(&adap->bus) 41 #else 42 #define I2C_LOCK_LIST(adap) down(&adap->list) 43 #define I2C_UNLOCK_LIST(adap) up(&adap->list) 44 #endif 38 #define I2C_LOCK_LIST(adap) down(&adap->lock) 39 #define I2C_UNLOCK_LIST(adap) up(&adap->lock) 45 40 46 41 #define DEB(x) if (i2c_debug>=1) x; … … 114 109 115 110 /* init data types */ 116 init_MUTEX(&adap->bus); 117 #if !I2C_LINUX_2_4_BINARY_COMPATIBILITY 118 init_MUTEX(&adap->list); 119 #endif 111 init_MUTEX(&adap->lock); 120 112 121 113 /* inform drivers of new adapters */ … … 701 693 } 702 694 703 down(&adap-> bus);695 down(&adap->lock); 704 696 ret = adap->algo->master_xfer(adap,msgs,num); 705 up(&adap-> bus);697 up(&adap->lock); 706 698 707 699 return ret; … … 728 720 count,client->adapter->name)); 729 721 730 down(&adap-> bus);722 down(&adap->lock); 731 723 ret = adap->algo->master_xfer(adap,&msg,1); 732 up(&adap-> bus);724 up(&adap->lock); 733 725 734 726 /* if everything went ok (i.e. 1 msg transmitted), return #bytes … … 758 750 count,client->adapter->name)); 759 751 760 down(&adap-> bus);752 down(&adap->lock); 761 753 ret = adap->algo->master_xfer(adap,&msg,1); 762 up(&adap-> bus);754 up(&adap->lock); 763 755 764 756 DEB2(printk(KERN_DEBUG "i2c-core.o: master_recv: return:%d (count:%d, addr:0x%02x)\n", … … 1355 1347 1356 1348 if (adapter->algo->smbus_xfer) { 1357 down(&adapter-> bus);1349 down(&adapter->lock); 1358 1350 res = adapter->algo->smbus_xfer(adapter,addr,flags,read_write, 1359 1351 command,size,data); 1360 up(&adapter-> bus);1352 up(&adapter->lock); 1361 1353 } else 1362 1354 res = i2c_smbus_xfer_emulated(adapter,addr,flags,read_write,
