mirror of
https://github.com/lm-sensors/lm-sensors
synced 2025-08-30 22:05:11 +00:00
Fixed a compiler warning, plus some code clean-ups.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1818 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
@@ -145,7 +145,8 @@ s32 nforce2_access(struct i2c_adapter * adap, u16 addr, unsigned short flags,
|
||||
union i2c_smbus_data * data)
|
||||
{
|
||||
struct nforce2_smbus *smbus = adap->algo_data;
|
||||
unsigned char protocol, len, pec, temp;
|
||||
unsigned char protocol, pec, temp;
|
||||
unsigned char len = 0; /* to keep the compiler quiet */
|
||||
int timeout = 0;
|
||||
int i;
|
||||
|
||||
@@ -276,12 +277,12 @@ s32 nforce2_access(struct i2c_adapter * adap, u16 addr, unsigned short flags,
|
||||
break;
|
||||
|
||||
case I2C_SMBUS_WORD_DATA:
|
||||
case I2C_SMBUS_PROC_CALL:
|
||||
/* case I2C_SMBUS_PROC_CALL: not supported */
|
||||
data->word = inb_p(NVIDIA_SMB_DATA) | (inb_p(NVIDIA_SMB_DATA+1) << 8);
|
||||
break;
|
||||
|
||||
case I2C_SMBUS_BLOCK_DATA:
|
||||
case I2C_SMBUS_BLOCK_PROC_CALL:
|
||||
/* case I2C_SMBUS_BLOCK_PROC_CALL: not supported */
|
||||
len = inb_p(NVIDIA_SMB_BCNT);
|
||||
len = min_t(u8, len, 32);
|
||||
case I2C_SMBUS_I2C_BLOCK_DATA:
|
||||
|
Reference in New Issue
Block a user