Changeset 3072

Show
Ignore:
Timestamp:
09/07/05 22:16:18 (8 years ago)
Author:
khali
Message:

Remove dead code. Backport from a 2.6 kernel patch by
Hans-Frieder Vogt.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/kernel/busses/i2c-nforce2.c

    r2909 r3072  
    120120 
    121121 
    122 /* Other settings */ 
    123 #define MAX_TIMEOUT 256 
    124  
    125  
    126  
    127122static s32 nforce2_access(struct i2c_adapter *adap, u16 addr, 
    128123                       unsigned short flags, char read_write, 
     
    150145        unsigned char protocol, pec, temp; 
    151146        unsigned char len = 0; /* to keep the compiler quiet */ 
    152         int timeout = 0; 
    153147        int i; 
    154148 
     
    209203                        printk(KERN_WARNING "i2c-nforce2.o: I2C_SMBUS_PROC_CALL not supported!\n"); 
    210204                        return -1; 
    211                         /* 
    212                         outb_p(command, NVIDIA_SMB_CMD); 
    213                         outb_p(data->word, NVIDIA_SMB_DATA); 
    214                         outb_p(data->word >> 8, NVIDIA_SMB_DATA + 1); 
    215                         protocol = NVIDIA_SMB_PRTCL_PROC_CALL | pec; 
    216                         read_write = I2C_SMBUS_READ; 
    217                         break; 
    218                          */ 
    219205 
    220206                case I2C_SMBUS_BLOCK_PROC_CALL: 
    221207                        printk(KERN_WARNING "i2c-nforce2.o: I2C_SMBUS_BLOCK_PROC_CALL not supported!\n"); 
    222208                        return -1; 
    223                         /* 
    224                         protocol |= pec; 
    225                         len = min_t(u8, data->block[0], 31); 
    226                         outb_p(command, NVIDIA_SMB_CMD); 
    227                         outb_p(len, NVIDIA_SMB_BCNT); 
    228                         for (i = 0; i < len; i++) 
    229                                 outb_p(data->block[i + 1], NVIDIA_SMB_DATA + i); 
    230                         protocol = NVIDIA_SMB_PRTCL_BLOCK_PROC_CALL | pec; 
    231                         read_write = I2C_SMBUS_READ; 
    232                         break; 
    233                         */ 
    234209 
    235210                case I2C_SMBUS_WORD_DATA_PEC: 
     
    250225        temp = inb_p(NVIDIA_SMB_STS); 
    251226 
    252 #if 0 
    253         do { 
    254                 i2c_delay(1); 
    255                 temp = inb_p(NVIDIA_SMB_STS); 
    256         } while (((temp & NVIDIA_SMB_STS_DONE) == 0) && (timeout++ < MAX_TIMEOUT)); 
    257 #endif 
    258227        if (~temp & NVIDIA_SMB_STS_DONE) { 
    259228                udelay(500); 
     
    265234        } 
    266235 
    267         if ((timeout >= MAX_TIMEOUT) || (~temp & NVIDIA_SMB_STS_DONE) || (temp & NVIDIA_SMB_STS_STATUS)) 
     236        if ((~temp & NVIDIA_SMB_STS_DONE) || (temp & NVIDIA_SMB_STS_STATUS)) { 
     237                printk(KERN_DEBUG "i2c-nforce2.o: SMBus Timeout! (0x%02x)\n", 
     238                       temp); 
    268239                return -1; 
     240        } 
    269241 
    270242        if (read_write == I2C_SMBUS_WRITE)