Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'staging-3.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull IIO fixes from Greg KH:
"Here are some IIO driver fixes for 3.16-rc5. Nothing major, just
resolves some minor issues that have been reported"

* tag 'staging-3.16-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
iio: ti_am335x_adc: Fix: Use same step id at FIFOs both ends
iio:tcs3472: Check for buffer enabled and locking
iio: hid-sensor-prox: Fix return values
iio: hid-sensor-gyro-3d: Fix return values
iio: hid-sensor-als: Fix return values
iio: hid-sensor-magn-3d: Fix return values
iio: hid-sensor-accel-3d: Fix return values
iio: hid-sensor-press: Fix return values

+23 -32
+2 -5
drivers/iio/accel/hid-sensor-accel-3d.c
··· 110 110 struct accel_3d_state *accel_state = iio_priv(indio_dev); 111 111 int report_id = -1; 112 112 u32 address; 113 - int ret; 114 113 int ret_type; 115 114 s32 poll_value; 116 115 ··· 150 151 ret_type = IIO_VAL_INT; 151 152 break; 152 153 case IIO_CHAN_INFO_SAMP_FREQ: 153 - ret = hid_sensor_read_samp_freq_value( 154 + ret_type = hid_sensor_read_samp_freq_value( 154 155 &accel_state->common_attributes, val, val2); 155 - ret_type = IIO_VAL_INT_PLUS_MICRO; 156 156 break; 157 157 case IIO_CHAN_INFO_HYSTERESIS: 158 - ret = hid_sensor_read_raw_hyst_value( 158 + ret_type = hid_sensor_read_raw_hyst_value( 159 159 &accel_state->common_attributes, val, val2); 160 - ret_type = IIO_VAL_INT_PLUS_MICRO; 161 160 break; 162 161 default: 163 162 ret_type = -EINVAL;
+1 -1
drivers/iio/adc/ti_am335x_adc.c
··· 374 374 return -EAGAIN; 375 375 } 376 376 } 377 - map_val = chan->channel + TOTAL_CHANNELS; 377 + map_val = adc_dev->channel_step[chan->scan_index]; 378 378 379 379 /* 380 380 * We check the complete FIFO. We programmed just one entry but in case
+2 -5
drivers/iio/gyro/hid-sensor-gyro-3d.c
··· 110 110 struct gyro_3d_state *gyro_state = iio_priv(indio_dev); 111 111 int report_id = -1; 112 112 u32 address; 113 - int ret; 114 113 int ret_type; 115 114 s32 poll_value; 116 115 ··· 150 151 ret_type = IIO_VAL_INT; 151 152 break; 152 153 case IIO_CHAN_INFO_SAMP_FREQ: 153 - ret = hid_sensor_read_samp_freq_value( 154 + ret_type = hid_sensor_read_samp_freq_value( 154 155 &gyro_state->common_attributes, val, val2); 155 - ret_type = IIO_VAL_INT_PLUS_MICRO; 156 156 break; 157 157 case IIO_CHAN_INFO_HYSTERESIS: 158 - ret = hid_sensor_read_raw_hyst_value( 158 + ret_type = hid_sensor_read_raw_hyst_value( 159 159 &gyro_state->common_attributes, val, val2); 160 - ret_type = IIO_VAL_INT_PLUS_MICRO; 161 160 break; 162 161 default: 163 162 ret_type = -EINVAL;
+2 -5
drivers/iio/light/hid-sensor-als.c
··· 79 79 struct als_state *als_state = iio_priv(indio_dev); 80 80 int report_id = -1; 81 81 u32 address; 82 - int ret; 83 82 int ret_type; 84 83 s32 poll_value; 85 84 ··· 128 129 ret_type = IIO_VAL_INT; 129 130 break; 130 131 case IIO_CHAN_INFO_SAMP_FREQ: 131 - ret = hid_sensor_read_samp_freq_value( 132 + ret_type = hid_sensor_read_samp_freq_value( 132 133 &als_state->common_attributes, val, val2); 133 - ret_type = IIO_VAL_INT_PLUS_MICRO; 134 134 break; 135 135 case IIO_CHAN_INFO_HYSTERESIS: 136 - ret = hid_sensor_read_raw_hyst_value( 136 + ret_type = hid_sensor_read_raw_hyst_value( 137 137 &als_state->common_attributes, val, val2); 138 - ret_type = IIO_VAL_INT_PLUS_MICRO; 139 138 break; 140 139 default: 141 140 ret_type = -EINVAL;
+2 -5
drivers/iio/light/hid-sensor-prox.c
··· 74 74 struct prox_state *prox_state = iio_priv(indio_dev); 75 75 int report_id = -1; 76 76 u32 address; 77 - int ret; 78 77 int ret_type; 79 78 s32 poll_value; 80 79 ··· 124 125 ret_type = IIO_VAL_INT; 125 126 break; 126 127 case IIO_CHAN_INFO_SAMP_FREQ: 127 - ret = hid_sensor_read_samp_freq_value( 128 + ret_type = hid_sensor_read_samp_freq_value( 128 129 &prox_state->common_attributes, val, val2); 129 - ret_type = IIO_VAL_INT_PLUS_MICRO; 130 130 break; 131 131 case IIO_CHAN_INFO_HYSTERESIS: 132 - ret = hid_sensor_read_raw_hyst_value( 132 + ret_type = hid_sensor_read_raw_hyst_value( 133 133 &prox_state->common_attributes, val, val2); 134 - ret_type = IIO_VAL_INT_PLUS_MICRO; 135 134 break; 136 135 default: 137 136 ret_type = -EINVAL;
+10 -1
drivers/iio/light/tcs3472.c
··· 52 52 53 53 struct tcs3472_data { 54 54 struct i2c_client *client; 55 + struct mutex lock; 55 56 u8 enable; 56 57 u8 control; 57 58 u8 atime; ··· 117 116 118 117 switch (mask) { 119 118 case IIO_CHAN_INFO_RAW: 119 + if (iio_buffer_enabled(indio_dev)) 120 + return -EBUSY; 121 + 122 + mutex_lock(&data->lock); 120 123 ret = tcs3472_req_data(data); 121 - if (ret < 0) 124 + if (ret < 0) { 125 + mutex_unlock(&data->lock); 122 126 return ret; 127 + } 123 128 ret = i2c_smbus_read_word_data(data->client, chan->address); 129 + mutex_unlock(&data->lock); 124 130 if (ret < 0) 125 131 return ret; 126 132 *val = ret; ··· 263 255 data = iio_priv(indio_dev); 264 256 i2c_set_clientdata(client, indio_dev); 265 257 data->client = client; 258 + mutex_init(&data->lock); 266 259 267 260 indio_dev->dev.parent = &client->dev; 268 261 indio_dev->info = &tcs3472_info;
+2 -5
drivers/iio/magnetometer/hid-sensor-magn-3d.c
··· 110 110 struct magn_3d_state *magn_state = iio_priv(indio_dev); 111 111 int report_id = -1; 112 112 u32 address; 113 - int ret; 114 113 int ret_type; 115 114 s32 poll_value; 116 115 ··· 152 153 ret_type = IIO_VAL_INT; 153 154 break; 154 155 case IIO_CHAN_INFO_SAMP_FREQ: 155 - ret = hid_sensor_read_samp_freq_value( 156 + ret_type = hid_sensor_read_samp_freq_value( 156 157 &magn_state->common_attributes, val, val2); 157 - ret_type = IIO_VAL_INT_PLUS_MICRO; 158 158 break; 159 159 case IIO_CHAN_INFO_HYSTERESIS: 160 - ret = hid_sensor_read_raw_hyst_value( 160 + ret_type = hid_sensor_read_raw_hyst_value( 161 161 &magn_state->common_attributes, val, val2); 162 - ret_type = IIO_VAL_INT_PLUS_MICRO; 163 162 break; 164 163 default: 165 164 ret_type = -EINVAL;
+2 -5
drivers/iio/pressure/hid-sensor-press.c
··· 78 78 struct press_state *press_state = iio_priv(indio_dev); 79 79 int report_id = -1; 80 80 u32 address; 81 - int ret; 82 81 int ret_type; 83 82 s32 poll_value; 84 83 ··· 127 128 ret_type = IIO_VAL_INT; 128 129 break; 129 130 case IIO_CHAN_INFO_SAMP_FREQ: 130 - ret = hid_sensor_read_samp_freq_value( 131 + ret_type = hid_sensor_read_samp_freq_value( 131 132 &press_state->common_attributes, val, val2); 132 - ret_type = IIO_VAL_INT_PLUS_MICRO; 133 133 break; 134 134 case IIO_CHAN_INFO_HYSTERESIS: 135 - ret = hid_sensor_read_raw_hyst_value( 135 + ret_type = hid_sensor_read_raw_hyst_value( 136 136 &press_state->common_attributes, val, val2); 137 - ret_type = IIO_VAL_INT_PLUS_MICRO; 138 137 break; 139 138 default: 140 139 ret_type = -EINVAL;