aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/max1619.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-07 19:14:20 -0500
committerPaul Mackerras <paulus@samba.org>2005-11-07 19:14:20 -0500
commit24bfb00123e82a2e70bd115277d922438813515b (patch)
tree27328b8a5718e16d64e2d101f4b7ddcad5930aed /drivers/hwmon/max1619.c
parentc6135234550ed89a6fd0e8cb229633967e41d649 (diff)
parent3f00d3e8fb963968a922d821a9a53b503b687e81 (diff)
Merge ../linux-2.6
Diffstat (limited to 'drivers/hwmon/max1619.c')
-rw-r--r--drivers/hwmon/max1619.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/hwmon/max1619.c b/drivers/hwmon/max1619.c
index 6a82ffae1bf..69e7e125683 100644
--- a/drivers/hwmon/max1619.c
+++ b/drivers/hwmon/max1619.c
@@ -193,7 +193,7 @@ static int max1619_detect(struct i2c_adapter *adapter, int address, int kind)
193 int err = 0; 193 int err = 0;
194 const char *name = ""; 194 const char *name = "";
195 u8 reg_config=0, reg_convrate=0, reg_status=0; 195 u8 reg_config=0, reg_convrate=0, reg_status=0;
196 u8 man_id, chip_id; 196
197 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) 197 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
198 goto exit; 198 goto exit;
199 199
@@ -238,16 +238,15 @@ static int max1619_detect(struct i2c_adapter *adapter, int address, int kind)
238 } 238 }
239 239
240 if (kind <= 0) { /* identification */ 240 if (kind <= 0) { /* identification */
241 u8 man_id, chip_id;
241 242
242 man_id = i2c_smbus_read_byte_data(new_client, 243 man_id = i2c_smbus_read_byte_data(new_client,
243 MAX1619_REG_R_MAN_ID); 244 MAX1619_REG_R_MAN_ID);
244 chip_id = i2c_smbus_read_byte_data(new_client, 245 chip_id = i2c_smbus_read_byte_data(new_client,
245 MAX1619_REG_R_CHIP_ID); 246 MAX1619_REG_R_CHIP_ID);
246 247
247 if ((man_id == 0x4D) && (chip_id == 0x04)){ 248 if ((man_id == 0x4D) && (chip_id == 0x04))
248 kind = max1619; 249 kind = max1619;
249 }
250 }
251 250
252 if (kind <= 0) { /* identification failed */ 251 if (kind <= 0) { /* identification failed */
253 dev_info(&adapter->dev, 252 dev_info(&adapter->dev,
@@ -255,11 +254,10 @@ static int max1619_detect(struct i2c_adapter *adapter, int address, int kind)
255 "chip_id=0x%02X).\n", man_id, chip_id); 254 "chip_id=0x%02X).\n", man_id, chip_id);
256 goto exit_free; 255 goto exit_free;
257 } 256 }
258 257 }
259 258
260 if (kind == max1619){ 259 if (kind == max1619)
261 name = "max1619"; 260 name = "max1619";
262 }
263 261
264 /* We can fill in the remaining client fields */ 262 /* We can fill in the remaining client fields */
265 strlcpy(new_client->name, name, I2C_NAME_SIZE); 263 strlcpy(new_client->name, name, I2C_NAME_SIZE);