Changeset 4625

Show
Ignore:
Timestamp:
07/18/07 23:02:42 (1 year ago)
Author:
khali
Message:

Whitespace cleaups (backport from Linux 2.6).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lm-sensors/trunk/kernel/busses/i2c-i801.c

    r4278 r4625  
    2323/* 
    2424    SUPPORTED DEVICES   PCI ID 
    25     82801AA             2413            
    26     82801AB             2423            
    27     82801BA             2443            
    28     82801CA/CAM         2483            
     25    82801AA             2413 
     26    82801AB             2423 
     27    82801BA             2443 
     28    82801CA/CAM         2483 
    2929    82801DB             24C3   (HW PEC supported, 32 byte buffer not supported) 
    3030    82801EB             24D3   (HW PEC supported, 32 byte buffer not supported) 
     
    158158                 "EXTREMELY DANGEROUS!"); 
    159159 
    160 static int i801_transaction(void); 
    161 static int i801_block_transaction(union i2c_smbus_data *data, char read_write, 
    162                                   int command, int hwpec); 
    163  
    164160static unsigned short i801_smba; 
    165161static struct pci_driver i801_driver; 
     
    176172            dev->device == PCI_DEVICE_ID_INTEL_82801EB_3 || 
    177173            dev->device == PCI_DEVICE_ID_INTEL_ESB_4 || 
    178             dev->device == PCI_DEVICE_ID_INTEL_ESB2_17 ||       
     174            dev->device == PCI_DEVICE_ID_INTEL_ESB2_17 || 
    179175            dev->device == PCI_DEVICE_ID_INTEL_ICH6_16 || 
    180176            dev->device == PCI_DEVICE_ID_INTEL_ICH7_17 || 
     
    336332                if (len < 1) 
    337333                        len = 1; 
    338                 if (len > 32
    339                         len = 32
     334                if (len > I2C_SMBUS_BLOCK_MAX
     335                        len = I2C_SMBUS_BLOCK_MAX
    340336                outb_p(len, SMBHSTDAT0); 
    341337                outb_p(data->block[1], SMBBLKDAT); 
     
    344340        } 
    345341 
    346         if(isich4 && command != I2C_SMBUS_I2C_BLOCK_DATA) { 
    347                 /* set 32 byte buffer */ 
    348         } 
    349  
    350342        for (i = 1; i <= len; i++) { 
    351343                if (i == len && read_write == I2C_SMBUS_READ) 
    352344                        smbcmd = I801_BLOCK_LAST; 
    353345                else if (command == I2C_SMBUS_I2C_BLOCK_DATA && 
    354                         read_write == I2C_SMBUS_READ) 
     346                        read_write == I2C_SMBUS_READ) 
    355347                        smbcmd = I801_I2C_BLOCK_DATA; 
    356348                else 
     
    366358                temp = inb_p(SMBHSTSTS); 
    367359                if (i == 1) { 
    368                         /* Erronenous conditions before transaction:  
     360                        /* Erroneous conditions before transaction: 
    369361                         * Byte_Done, Failed, Bus_Err, Dev_Err, Intr, Host_Busy */ 
    370                         errmask=0x9f;  
     362                        errmask = 0x9f; 
    371363                } else { 
    372                         /* Erronenous conditions during transaction:  
     364                        /* Erroneous conditions during transaction: 
    373365                         * Failed, Bus_Err, Dev_Err, Intr */ 
    374                         errmask=0x1e;  
     366                        errmask = 0x1e; 
    375367                } 
    376368                if (temp & errmask) { 
     
    382374                                        "Reset failed! (%02x)\n", temp); 
    383375                                result = -1; 
    384                                 goto END; 
     376                               goto END; 
    385377                        } 
    386378                        if (i != 1) { 
     
    400392                        temp = inb_p(SMBHSTSTS); 
    401393                } 
    402                     while ((!(temp & 0x80)) 
    403                           && (timeout++ < MAX_TIMEOUT)); 
     394                while ((!(temp & 0x80)) 
     395                       && (timeout++ < MAX_TIMEOUT)); 
    404396 
    405397                /* If the SMBus is still busy, we give up */ 
     
    426418                                if (len < 1) 
    427419                                        len = 1; 
    428                                 if (len > 32
    429                                         len = 32
     420                                if (len > I2C_SMBUS_BLOCK_MAX
     421                                        len = I2C_SMBUS_BLOCK_MAX
    430422                                data->block[0] = len; 
    431423                        } else { 
     
    469461                        dev_dbg(I801_dev, "PEC Timeout!\n"); 
    470462                } 
    471                 outb_p(temp, SMBHSTSTS);  
     463                outb_p(temp, SMBHSTSTS); 
    472464        } 
    473465        result = 0; 
     
    597589#if 0 
    598590             | (isich5 ? I2C_FUNC_SMBUS_READ_I2C_BLOCK 
    599                        : 0) 
     591                      : 0) 
    600592#endif 
    601593            ;