projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'upstream'
[powerpc.git]
/
drivers
/
hwmon
/
max1619.c
diff --git
a/drivers/hwmon/max1619.c
b/drivers/hwmon/max1619.c
index
6a82ffa
..
3abe330
100644
(file)
--- a/
drivers/hwmon/max1619.c
+++ b/
drivers/hwmon/max1619.c
@@
-90,9
+90,9
@@
static struct max1619_data *max1619_update_device(struct device *dev);
*/
static struct i2c_driver max1619_driver = {
*/
static struct i2c_driver max1619_driver = {
- .
owner = THIS_MODULE,
-
.name
= "max1619",
-
.flags = I2C_DF_NOTIFY
,
+ .
driver = {
+
.name
= "max1619",
+
}
,
.attach_adapter = max1619_attach_adapter,
.detach_client = max1619_detach_client,
};
.attach_adapter = max1619_attach_adapter,
.detach_client = max1619_detach_client,
};
@@
-193,7
+193,7
@@
static int max1619_detect(struct i2c_adapter *adapter, int address, int kind)
int err = 0;
const char *name = "";
u8 reg_config=0, reg_convrate=0, reg_status=0;
int err = 0;
const char *name = "";
u8 reg_config=0, reg_convrate=0, reg_status=0;
- u8 man_id, chip_id;
+
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
goto exit;
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
goto exit;
@@
-238,16
+238,15
@@
static int max1619_detect(struct i2c_adapter *adapter, int address, int kind)
}
if (kind <= 0) { /* identification */
}
if (kind <= 0) { /* identification */
+ u8 man_id, chip_id;
man_id = i2c_smbus_read_byte_data(new_client,
MAX1619_REG_R_MAN_ID);
chip_id = i2c_smbus_read_byte_data(new_client,
MAX1619_REG_R_CHIP_ID);
man_id = i2c_smbus_read_byte_data(new_client,
MAX1619_REG_R_MAN_ID);
chip_id = i2c_smbus_read_byte_data(new_client,
MAX1619_REG_R_CHIP_ID);
- if ((man_id == 0x4D) && (chip_id == 0x04)){
- kind = max1619;
- }
- }
+ if ((man_id == 0x4D) && (chip_id == 0x04))
+ kind = max1619;
if (kind <= 0) { /* identification failed */
dev_info(&adapter->dev,
if (kind <= 0) { /* identification failed */
dev_info(&adapter->dev,
@@
-255,11
+254,10
@@
static int max1619_detect(struct i2c_adapter *adapter, int address, int kind)
"chip_id=0x%02X).\n", man_id, chip_id);
goto exit_free;
}
"chip_id=0x%02X).\n", man_id, chip_id);
goto exit_free;
}
-
+ }
- if (kind == max1619)
{
+ if (kind == max1619)
name = "max1619";
name = "max1619";
- }
/* We can fill in the remaining client fields */
strlcpy(new_client->name, name, I2C_NAME_SIZE);
/* We can fill in the remaining client fields */
strlcpy(new_client->name, name, I2C_NAME_SIZE);