diff options
Diffstat (limited to 'drivers/hwmon/gl520sm.c')
-rw-r--r-- | drivers/hwmon/gl520sm.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c index 19616f2242b0..92b5720ceaff 100644 --- a/drivers/hwmon/gl520sm.c +++ b/drivers/hwmon/gl520sm.c | |||
@@ -691,13 +691,11 @@ static int gl520_detect(struct i2c_client *client, int kind, | |||
691 | return -ENODEV; | 691 | return -ENODEV; |
692 | 692 | ||
693 | /* Determine the chip type. */ | 693 | /* Determine the chip type. */ |
694 | if (kind < 0) { | 694 | if ((gl520_read_value(client, GL520_REG_CHIP_ID) != 0x20) || |
695 | if ((gl520_read_value(client, GL520_REG_CHIP_ID) != 0x20) || | 695 | ((gl520_read_value(client, GL520_REG_REVISION) & 0x7f) != 0x00) || |
696 | ((gl520_read_value(client, GL520_REG_REVISION) & 0x7f) != 0x00) || | 696 | ((gl520_read_value(client, GL520_REG_CONF) & 0x80) != 0x00)) { |
697 | ((gl520_read_value(client, GL520_REG_CONF) & 0x80) != 0x00)) { | 697 | dev_dbg(&client->dev, "Unknown chip type, skipping\n"); |
698 | dev_dbg(&client->dev, "Unknown chip type, skipping\n"); | 698 | return -ENODEV; |
699 | return -ENODEV; | ||
700 | } | ||
701 | } | 699 | } |
702 | 700 | ||
703 | strlcpy(info->type, "gl520sm", I2C_NAME_SIZE); | 701 | strlcpy(info->type, "gl520sm", I2C_NAME_SIZE); |