Skip to content

Commit

Permalink
hwmon: (ltc4261) Fix error message format
Browse files Browse the repository at this point in the history
adapter->id is deprecated and not set by any adapter driver, so this
was certainly not what the author wanted to use. adapter->nr maybe,
but as dev_err() already includes this value, as well as the client's
address, there's no point repeating them. Better print a simple error
message in plain English words.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
  • Loading branch information
Jean Delvare authored and Guenter Roeck committed Nov 5, 2010
1 parent 69f8b74 commit 475200c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/hwmon/ltc4261.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@ static int ltc4261_probe(struct i2c_client *client,
return -ENODEV;

if (i2c_smbus_read_byte_data(client, LTC4261_STATUS) < 0) {
dev_err(&client->dev, "Failed to read register %d:%02x:%02x\n",
adapter->id, client->addr, LTC4261_STATUS);
dev_err(&client->dev, "Failed to read status register\n");
return -ENODEV;
}

Expand Down

0 comments on commit 475200c

Please sign in to comment.