Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292105
b: refs/heads/master
c: 08f5090
h: refs/heads/master
i:
  292103: 9c9934f
v: v3
  • Loading branch information
Frans Meulenbroeks authored and Guenter Roeck committed Mar 19, 2012
1 parent aa62b95 commit df0082d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: 4d7c5d4f40246f0f50767a1fe6445e067a972c64
refs/heads/master: 08f509077499907c8bae59818771ce18d3179aa9
10 changes: 7 additions & 3 deletions trunk/drivers/hwmon/adm1029.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,

#define TEMP_FROM_REG(val) ((val) * 1000)

#define DIV_FROM_REG(val) ( 1 << (((val) >> 6) - 1))
#define DIV_FROM_REG(val) (1 << (((val) >> 6) - 1))

/* Registers to be checked by adm1029_update_device() */
static const u8 ADM1029_REG_TEMP[] = {
Expand Down Expand Up @@ -200,8 +200,11 @@ static ssize_t set_fan_div(struct device *dev,
struct i2c_client *client = to_i2c_client(dev);
struct adm1029_data *data = i2c_get_clientdata(client);
struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
long val = simple_strtol(buf, NULL, 10);
u8 reg;
long val;
int ret = kstrtol(buf, 10, &val);
if (ret < 0)
return ret;

mutex_lock(&data->update_lock);

Expand Down Expand Up @@ -355,7 +358,8 @@ static int adm1029_probe(struct i2c_client *client,
}

/* Register sysfs hooks */
if ((err = sysfs_create_group(&client->dev.kobj, &adm1029_group)))
err = sysfs_create_group(&client->dev.kobj, &adm1029_group);
if (err)
goto exit_free;

data->hwmon_dev = hwmon_device_register(&client->dev);
Expand Down

0 comments on commit df0082d

Please sign in to comment.