Show
Ignore:
Timestamp:
12/15/08 13:45:58 (3 years ago)
Author:
khali
Message:

Drop Linux 2.4 binary incompatibility mode. It didn't make any sense
to start with. Dropping it will make the code more simple and the
differences to the mainline kernel smaller.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • i2c/trunk/kernel/i2c-core.c

    r4245 r5570  
    3636/* ----- global defines ---------------------------------------------------- */ 
    3737 
    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) 
    4540 
    4641#define DEB(x) if (i2c_debug>=1) x; 
     
    114109         
    115110        /* 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); 
    120112 
    121113        /* inform drivers of new adapters */ 
     
    701693                } 
    702694 
    703                 down(&adap->bus); 
     695                down(&adap->lock); 
    704696                ret = adap->algo->master_xfer(adap,msgs,num); 
    705                 up(&adap->bus); 
     697                up(&adap->lock); 
    706698 
    707699                return ret; 
     
    728720                        count,client->adapter->name)); 
    729721         
    730                 down(&adap->bus); 
     722                down(&adap->lock); 
    731723                ret = adap->algo->master_xfer(adap,&msg,1); 
    732                 up(&adap->bus); 
     724                up(&adap->lock); 
    733725 
    734726                /* if everything went ok (i.e. 1 msg transmitted), return #bytes 
     
    758750                        count,client->adapter->name)); 
    759751         
    760                 down(&adap->bus); 
     752                down(&adap->lock); 
    761753                ret = adap->algo->master_xfer(adap,&msg,1); 
    762                 up(&adap->bus); 
     754                up(&adap->lock); 
    763755         
    764756                DEB2(printk(KERN_DEBUG "i2c-core.o: master_recv: return:%d (count:%d, addr:0x%02x)\n", 
     
    13551347 
    13561348        if (adapter->algo->smbus_xfer) { 
    1357                 down(&adapter->bus); 
     1349                down(&adapter->lock); 
    13581350                res = adapter->algo->smbus_xfer(adapter,addr,flags,read_write, 
    13591351                                                command,size,data); 
    1360                 up(&adapter->bus); 
     1352                up(&adapter->lock); 
    13611353        } else 
    13621354                res = i2c_smbus_xfer_emulated(adapter,addr,flags,read_write,