Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292123
b: refs/heads/master
c: b3789a0
h: refs/heads/master
i:
  292121: bc78ec3
  292119: e135db3
v: v3
  • Loading branch information
Frans Meulenbroeks authored and Guenter Roeck committed Mar 19, 2012
1 parent 46ec53c commit 69b4b29
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93092a644fb519ec520c3a1f3e05ef9d25b1dac4
refs/heads/master: b3789a0de229b4e9cc6d2531c7cbcdb5424a37b8
17 changes: 12 additions & 5 deletions trunk/drivers/hwmon/lm83.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static struct lm83_data *lm83_update_device(struct device *dev);
/*
* Driver data (common to all clients)
*/

static const struct i2c_device_id lm83_id[] = {
{ "lm83", lm83 },
{ "lm82", lm82 },
Expand Down Expand Up @@ -179,8 +179,13 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *devattr,
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
struct i2c_client *client = to_i2c_client(dev);
struct lm83_data *data = i2c_get_clientdata(client);
long val = simple_strtol(buf, NULL, 10);
long val;
int nr = attr->index;
int err;

err = kstrtol(buf, 10, &val);
if (err < 0)
return err;

mutex_lock(&data->update_lock);
data->temp[nr] = TEMP_TO_REG(val);
Expand Down Expand Up @@ -355,12 +360,14 @@ static int lm83_probe(struct i2c_client *new_client,
* declare 1 and 3 common, and then 2 and 4 only for the LM83.
*/

if ((err = sysfs_create_group(&new_client->dev.kobj, &lm83_group)))
err = sysfs_create_group(&new_client->dev.kobj, &lm83_group);
if (err)
goto exit_free;

if (id->driver_data == lm83) {
if ((err = sysfs_create_group(&new_client->dev.kobj,
&lm83_group_opt)))
err = sysfs_create_group(&new_client->dev.kobj,
&lm83_group_opt);
if (err)
goto exit_remove_files;
}

Expand Down

0 comments on commit 69b4b29

Please sign in to comment.