Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304749
b: refs/heads/master
c: 4fd4d7d
h: refs/heads/master
i:
  304747: 71c8d18
v: v3
  • Loading branch information
Peter Meerwald authored and Greg Kroah-Hartman committed May 17, 2012
1 parent 1207b4c commit ae03714
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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: 4906a15c037f423b711ed2927836568264761927
refs/heads/master: 4fd4d7d8de0ade3da10f9d08506dca5b4ddf1245
3 changes: 2 additions & 1 deletion trunk/drivers/staging/iio/magnetometer/hmc5843.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,12 +343,13 @@ static s32 hmc5843_set_rate(struct i2c_client *client,
struct hmc5843_data *data = iio_priv(indio_dev);
u8 reg_val;

reg_val = (data->meas_conf) | (rate << HMC5843_RATE_OFFSET);
if (rate >= HMC5843_RATE_NOT_USED) {
dev_err(&client->dev,
"data output rate is not supported\n");
return -EINVAL;
}

reg_val = data->meas_conf | (rate << HMC5843_RATE_OFFSET);
return i2c_smbus_write_byte_data(client, HMC5843_CONFIG_REG_A, reg_val);
}

Expand Down

0 comments on commit ae03714

Please sign in to comment.