From 6584891bd0607ec7c67868b82d221bef67558962 Mon Sep 17 00:00:00 2001 From: Peter Meerwald Date: Wed, 5 Feb 2014 09:09:00 +0000 Subject: [PATCH] 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 Signed-off-by: Jonathan Cameron --- drivers/iio/magnetometer/mag3110.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, indio_dev->num_channels = ARRAY_SIZE(mag3110_channels); indio_dev->available_scan_masks = mag3110_scan_masks; - data->ctrl_reg1 = MAG3110_CTRL_DR_DEFAULT; + data->ctrl_reg1 = MAG3110_CTRL_DR_DEFAULT << MAG3110_CTRL_DR_SHIFT; ret = i2c_smbus_write_byte_data(client, MAG3110_CTRL_REG1, data->ctrl_reg1); if (ret < 0) -- 2.20.1