Show
Ignore:
Timestamp:
08/03/03 07:11:58 (11 years ago)
Author:
mmh
Message:

Added utility function i2c_delay(1), to replace various "do_pause"
(mmh) functions in bus drivers. Backported from the 2.6 work of Greg KH.

Files:
1 modified

Legend:

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

    r1912 r1936  
    113113                       unsigned short flags, char read_write, 
    114114                       u8 command, int size, union i2c_smbus_data *data); 
    115 #if 0 
    116 static void nforce2_do_pause(unsigned int amount); 
    117 #endif 
    118115/* 
    119116static int nforce2_block_transaction(union i2c_smbus_data *data, 
     
    129126        .functionality = nforce2_func, 
    130127}; 
    131  
    132  
    133  
    134 #if 0 
    135 /* Internally used pause function */ 
    136 void nforce2_do_pause(unsigned int amount) 
    137 { 
    138         current->state = TASK_INTERRUPTIBLE; 
    139         schedule_timeout(amount); 
    140 } 
    141 #endif 
    142128 
    143129/* Return -1 on error. See smbus.h for more information */ 
     
    251237#if 0 
    252238        do { 
    253                 nforce2_do_pause(1); 
     239                i2c_delay(1); 
    254240                temp = inb_p(NVIDIA_SMB_STS); 
    255241        } while (((temp & NVIDIA_SMB_STS_DONE) == 0) && (timeout++ < MAX_TIMEOUT)); 
     
    260246        } 
    261247        if (~temp & NVIDIA_SMB_STS_DONE) { 
    262                 current->state = TASK_INTERRUPTIBLE; 
    263                 schedule_timeout(HZ/100); 
     248                i2c_delay(HZ/100); 
    264249                temp = inb_p(NVIDIA_SMB_STS); 
    265250        }