aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2014-02-05 04:09:00 -0500
committerJonathan Cameron <jic23@kernel.org>2014-05-03 06:19:42 -0400
commit6584891bd0607ec7c67868b82d221bef67558962 (patch)
tree13c27273e9e068b01cfe82617daf03006c29f3e4 /drivers/iio/magnetometer
parent82a5803c782417754bdebb8dfa34edc62c0d8bbc (diff)
iio:magnetometer:mag3110: Fix initialization of ctrl_reg1
DR bits need to be shifted; since MAG3110_CTRL_DR_DEFAULT is zero, the change has no effect Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r--drivers/iio/magnetometer/mag3110.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/magnetometer/mag3110.c b/drivers/iio/magnetometer/mag3110.c
index 8b77782474d7..1b2df75d07d0 100644
--- a/drivers/iio/magnetometer/mag3110.c
+++ b/drivers/iio/magnetometer/mag3110.c
@@ -338,7 +338,7 @@ static int mag3110_probe(struct i2c_client *client,
338 indio_dev->num_channels = ARRAY_SIZE(mag3110_channels); 338 indio_dev->num_channels = ARRAY_SIZE(mag3110_channels);
339 indio_dev->available_scan_masks = mag3110_scan_masks; 339 indio_dev->available_scan_masks = mag3110_scan_masks;
340 340
341 data->ctrl_reg1 = MAG3110_CTRL_DR_DEFAULT; 341 data->ctrl_reg1 = MAG3110_CTRL_DR_DEFAULT << MAG3110_CTRL_DR_SHIFT;
342 ret = i2c_smbus_write_byte_data(client, MAG3110_CTRL_REG1, 342 ret = i2c_smbus_write_byte_data(client, MAG3110_CTRL_REG1,
343 data->ctrl_reg1); 343 data->ctrl_reg1);
344 if (ret < 0) 344 if (ret < 0)