summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/asc7621.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-08-14 21:08:52 +0200
committerJean Delvare <khali@linux-fr.org>2010-08-14 21:08:52 +0200
commit28cbd461f022e30dba555926b76625a35e194166 (patch)
treeb5f4f40c39f8fd6cc84d247ad506985a8cd0dc23 /drivers/hwmon/asc7621.c
parent738e5e05362bdbb31dbc270d31005c12cec8dbb2 (diff)
downloadblackbird-op-linux-28cbd461f022e30dba555926b76625a35e194166.tar.gz
blackbird-op-linux-28cbd461f022e30dba555926b76625a35e194166.zip
hwmon: (asc7621) Clean up and improve detect function
* The dev variable is never used. * Detect functions only need to set info->type, not client->name. * Include the device address in the log message. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: George Joseph <george.joseph@fairview5.com> Cc: Ken Milmore <ken.milmore@googlemail.com>
Diffstat (limited to 'drivers/hwmon/asc7621.c')
-rw-r--r--drivers/hwmon/asc7621.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/hwmon/asc7621.c b/drivers/hwmon/asc7621.c
index 3b973f30b1f6..89b4f3babe87 100644
--- a/drivers/hwmon/asc7621.c
+++ b/drivers/hwmon/asc7621.c
@@ -1150,9 +1150,6 @@ static int asc7621_detect(struct i2c_client *client,
{
struct i2c_adapter *adapter = client->adapter;
int company, verstep, chip_index;
- struct device *dev;
-
- dev = &client->dev;
if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
return -ENODEV;
@@ -1169,13 +1166,11 @@ static int asc7621_detect(struct i2c_client *client,
if (company == asc7621_chips[chip_index].company_id &&
verstep == asc7621_chips[chip_index].verstep_id) {
- strlcpy(client->name, asc7621_chips[chip_index].name,
- I2C_NAME_SIZE);
strlcpy(info->type, asc7621_chips[chip_index].name,
I2C_NAME_SIZE);
- dev_info(&adapter->dev, "Matched %s\n",
- asc7621_chips[chip_index].name);
+ dev_info(&adapter->dev, "Matched %s at 0x%02x\n",
+ asc7621_chips[chip_index].name, client->addr);
return 0;
}
}
OpenPOWER on IntegriCloud