aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-09 00:27:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-09 00:27:51 -0400
commit141dc40ee343ab532717b235dd645e2d25ae3092 (patch)
tree2289e5d1ec20df5e465b9b629e291877f4d70485 /drivers/iio
parent1c83d94ff646001f9ee83f0330a3933b55660927 (diff)
parent317ddd256b9c24b0d78fa8018f80f1e495481a10 (diff)
Merge 3.10-rc5 into usb-next
We need the changes in this branch. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/buffer_cb.c5
-rw-r--r--drivers/iio/frequency/adf4350.c2
-rw-r--r--drivers/iio/inkern.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/drivers/iio/buffer_cb.c b/drivers/iio/buffer_cb.c
index 9201022945e9..9d19ba74f22b 100644
--- a/drivers/iio/buffer_cb.c
+++ b/drivers/iio/buffer_cb.c
@@ -64,7 +64,7 @@ struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev,
64 while (chan->indio_dev) { 64 while (chan->indio_dev) {
65 if (chan->indio_dev != indio_dev) { 65 if (chan->indio_dev != indio_dev) {
66 ret = -EINVAL; 66 ret = -EINVAL;
67 goto error_release_channels; 67 goto error_free_scan_mask;
68 } 68 }
69 set_bit(chan->channel->scan_index, 69 set_bit(chan->channel->scan_index,
70 cb_buff->buffer.scan_mask); 70 cb_buff->buffer.scan_mask);
@@ -73,6 +73,8 @@ struct iio_cb_buffer *iio_channel_get_all_cb(struct device *dev,
73 73
74 return cb_buff; 74 return cb_buff;
75 75
76error_free_scan_mask:
77 kfree(cb_buff->buffer.scan_mask);
76error_release_channels: 78error_release_channels:
77 iio_channel_release_all(cb_buff->channels); 79 iio_channel_release_all(cb_buff->channels);
78error_free_cb_buff: 80error_free_cb_buff:
@@ -100,6 +102,7 @@ EXPORT_SYMBOL_GPL(iio_channel_stop_all_cb);
100 102
101void iio_channel_release_all_cb(struct iio_cb_buffer *cb_buff) 103void iio_channel_release_all_cb(struct iio_cb_buffer *cb_buff)
102{ 104{
105 kfree(cb_buff->buffer.scan_mask);
103 iio_channel_release_all(cb_buff->channels); 106 iio_channel_release_all(cb_buff->channels);
104 kfree(cb_buff); 107 kfree(cb_buff);
105} 108}
diff --git a/drivers/iio/frequency/adf4350.c b/drivers/iio/frequency/adf4350.c
index a884252ac66b..e76d4ace53ff 100644
--- a/drivers/iio/frequency/adf4350.c
+++ b/drivers/iio/frequency/adf4350.c
@@ -212,7 +212,7 @@ static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
212 (pdata->r2_user_settings & (ADF4350_REG2_PD_POLARITY_POS | 212 (pdata->r2_user_settings & (ADF4350_REG2_PD_POLARITY_POS |
213 ADF4350_REG2_LDP_6ns | ADF4350_REG2_LDF_INT_N | 213 ADF4350_REG2_LDP_6ns | ADF4350_REG2_LDF_INT_N |
214 ADF4350_REG2_CHARGE_PUMP_CURR_uA(5000) | 214 ADF4350_REG2_CHARGE_PUMP_CURR_uA(5000) |
215 ADF4350_REG2_MUXOUT(0x7) | ADF4350_REG2_NOISE_MODE(0x9))); 215 ADF4350_REG2_MUXOUT(0x7) | ADF4350_REG2_NOISE_MODE(0x3)));
216 216
217 st->regs[ADF4350_REG3] = pdata->r3_user_settings & 217 st->regs[ADF4350_REG3] = pdata->r3_user_settings &
218 (ADF4350_REG3_12BIT_CLKDIV(0xFFF) | 218 (ADF4350_REG3_12BIT_CLKDIV(0xFFF) |
diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 795d100b4c36..98ddc323add0 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -124,7 +124,7 @@ static int __of_iio_channel_get(struct iio_channel *channel,
124 channel->indio_dev = indio_dev; 124 channel->indio_dev = indio_dev;
125 index = iiospec.args_count ? iiospec.args[0] : 0; 125 index = iiospec.args_count ? iiospec.args[0] : 0;
126 if (index >= indio_dev->num_channels) { 126 if (index >= indio_dev->num_channels) {
127 return -EINVAL; 127 err = -EINVAL;
128 goto err_put; 128 goto err_put;
129 } 129 }
130 channel->channel = &indio_dev->channels[index]; 130 channel->channel = &indio_dev->channels[index];
@@ -450,7 +450,7 @@ static int iio_convert_raw_to_processed_unlocked(struct iio_channel *chan,
450 s64 raw64 = raw; 450 s64 raw64 = raw;
451 int ret; 451 int ret;
452 452
453 ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_SCALE); 453 ret = iio_channel_read(chan, &offset, NULL, IIO_CHAN_INFO_OFFSET);
454 if (ret == 0) 454 if (ret == 0)
455 raw64 += offset; 455 raw64 += offset;
456 456