2
0
mirror of https://github.com/lm-sensors/lm-sensors synced 2025-08-31 22:35:23 +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:
Jean Delvare
2003-06-27 16:15:24 +00:00
parent 2db3917eac
commit abec4c64eb

View File

@@ -145,7 +145,8 @@ s32 nforce2_access(struct i2c_adapter * adap, u16 addr, unsigned short flags,
union i2c_smbus_data * data) union i2c_smbus_data * data)
{ {
struct nforce2_smbus *smbus = adap->algo_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 timeout = 0;
int i; int i;
@@ -276,12 +277,12 @@ s32 nforce2_access(struct i2c_adapter * adap, u16 addr, unsigned short flags,
break; break;
case I2C_SMBUS_WORD_DATA: 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); data->word = inb_p(NVIDIA_SMB_DATA) | (inb_p(NVIDIA_SMB_DATA+1) << 8);
break; break;
case I2C_SMBUS_BLOCK_DATA: 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 = inb_p(NVIDIA_SMB_BCNT);
len = min_t(u8, len, 32); len = min_t(u8, len, 32);
case I2C_SMBUS_I2C_BLOCK_DATA: case I2C_SMBUS_I2C_BLOCK_DATA: