diff options
33 files changed, 124 insertions, 62 deletions
diff --git a/drivers/iio/accel/hid-sensor-accel-3d.c b/drivers/iio/accel/hid-sensor-accel-3d.c index dcda17395c4e..1cae4e920c9b 100644 --- a/drivers/iio/accel/hid-sensor-accel-3d.c +++ b/drivers/iio/accel/hid-sensor-accel-3d.c | |||
@@ -350,7 +350,7 @@ static int hid_accel_3d_probe(struct platform_device *pdev) | |||
350 | error_iio_unreg: | 350 | error_iio_unreg: |
351 | iio_device_unregister(indio_dev); | 351 | iio_device_unregister(indio_dev); |
352 | error_remove_trigger: | 352 | error_remove_trigger: |
353 | hid_sensor_remove_trigger(indio_dev); | 353 | hid_sensor_remove_trigger(&accel_state->common_attributes); |
354 | error_unreg_buffer_funcs: | 354 | error_unreg_buffer_funcs: |
355 | iio_triggered_buffer_cleanup(indio_dev); | 355 | iio_triggered_buffer_cleanup(indio_dev); |
356 | error_free_dev_mem: | 356 | error_free_dev_mem: |
@@ -363,10 +363,11 @@ static int hid_accel_3d_remove(struct platform_device *pdev) | |||
363 | { | 363 | { |
364 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; | 364 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; |
365 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 365 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
366 | struct accel_3d_state *accel_state = iio_priv(indio_dev); | ||
366 | 367 | ||
367 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ACCEL_3D); | 368 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ACCEL_3D); |
368 | iio_device_unregister(indio_dev); | 369 | iio_device_unregister(indio_dev); |
369 | hid_sensor_remove_trigger(indio_dev); | 370 | hid_sensor_remove_trigger(&accel_state->common_attributes); |
370 | iio_triggered_buffer_cleanup(indio_dev); | 371 | iio_triggered_buffer_cleanup(indio_dev); |
371 | kfree(indio_dev->channels); | 372 | kfree(indio_dev->channels); |
372 | 373 | ||
diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c index d72118d1189c..98ba761cbb9c 100644 --- a/drivers/iio/accel/kxsd9.c +++ b/drivers/iio/accel/kxsd9.c | |||
@@ -112,9 +112,10 @@ static int kxsd9_read(struct iio_dev *indio_dev, u8 address) | |||
112 | mutex_lock(&st->buf_lock); | 112 | mutex_lock(&st->buf_lock); |
113 | st->tx[0] = KXSD9_READ(address); | 113 | st->tx[0] = KXSD9_READ(address); |
114 | ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); | 114 | ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); |
115 | if (ret) | 115 | if (!ret) |
116 | return ret; | 116 | ret = (((u16)(st->rx[0])) << 8) | (st->rx[1] & 0xF0); |
117 | return (((u16)(st->rx[0])) << 8) | (st->rx[1] & 0xF0); | 117 | mutex_unlock(&st->buf_lock); |
118 | return ret; | ||
118 | } | 119 | } |
119 | 120 | ||
120 | static IIO_CONST_ATTR(accel_scale_available, | 121 | static IIO_CONST_ATTR(accel_scale_available, |
diff --git a/drivers/iio/adc/at91_adc.c b/drivers/iio/adc/at91_adc.c index 17df74908db1..5b1aa027c034 100644 --- a/drivers/iio/adc/at91_adc.c +++ b/drivers/iio/adc/at91_adc.c | |||
@@ -1047,6 +1047,7 @@ static int at91_adc_probe(struct platform_device *pdev) | |||
1047 | } else { | 1047 | } else { |
1048 | if (!st->caps->has_tsmr) { | 1048 | if (!st->caps->has_tsmr) { |
1049 | dev_err(&pdev->dev, "We don't support non-TSMR adc\n"); | 1049 | dev_err(&pdev->dev, "We don't support non-TSMR adc\n"); |
1050 | ret = -ENODEV; | ||
1050 | goto error_disable_adc_clk; | 1051 | goto error_disable_adc_clk; |
1051 | } | 1052 | } |
1052 | 1053 | ||
diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c index 12948325431c..c8c1baaec6c1 100644 --- a/drivers/iio/adc/mcp3422.c +++ b/drivers/iio/adc/mcp3422.c | |||
@@ -88,10 +88,10 @@ static const int mcp3422_sample_rates[4] = { | |||
88 | 88 | ||
89 | /* sample rates to sign extension table */ | 89 | /* sample rates to sign extension table */ |
90 | static const int mcp3422_sign_extend[4] = { | 90 | static const int mcp3422_sign_extend[4] = { |
91 | [MCP3422_SRATE_240] = 12, | 91 | [MCP3422_SRATE_240] = 11, |
92 | [MCP3422_SRATE_60] = 14, | 92 | [MCP3422_SRATE_60] = 13, |
93 | [MCP3422_SRATE_15] = 16, | 93 | [MCP3422_SRATE_15] = 15, |
94 | [MCP3422_SRATE_3] = 18 }; | 94 | [MCP3422_SRATE_3] = 17 }; |
95 | 95 | ||
96 | /* Client data (each client gets its own) */ | 96 | /* Client data (each client gets its own) */ |
97 | struct mcp3422 { | 97 | struct mcp3422 { |
diff --git a/drivers/iio/adc/ti_am335x_adc.c b/drivers/iio/adc/ti_am335x_adc.c index 728411ec7642..d4d748214e4b 100644 --- a/drivers/iio/adc/ti_am335x_adc.c +++ b/drivers/iio/adc/ti_am335x_adc.c | |||
@@ -229,12 +229,15 @@ static int tiadc_iio_buffered_hardware_setup(struct iio_dev *indio_dev, | |||
229 | unsigned long flags, | 229 | unsigned long flags, |
230 | const struct iio_buffer_setup_ops *setup_ops) | 230 | const struct iio_buffer_setup_ops *setup_ops) |
231 | { | 231 | { |
232 | struct iio_buffer *buffer; | ||
232 | int ret; | 233 | int ret; |
233 | 234 | ||
234 | indio_dev->buffer = iio_kfifo_allocate(indio_dev); | 235 | buffer = iio_kfifo_allocate(indio_dev); |
235 | if (!indio_dev->buffer) | 236 | if (!buffer) |
236 | return -ENOMEM; | 237 | return -ENOMEM; |
237 | 238 | ||
239 | iio_device_attach_buffer(indio_dev, buffer); | ||
240 | |||
238 | ret = request_threaded_irq(irq, pollfunc_th, pollfunc_bh, | 241 | ret = request_threaded_irq(irq, pollfunc_th, pollfunc_bh, |
239 | flags, indio_dev->name, indio_dev); | 242 | flags, indio_dev->name, indio_dev); |
240 | if (ret) | 243 | if (ret) |
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c index b6e77e0fc420..bbd6426c9726 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c | |||
@@ -55,11 +55,10 @@ static int hid_sensor_data_rdy_trigger_set_state(struct iio_trigger *trig, | |||
55 | return 0; | 55 | return 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | void hid_sensor_remove_trigger(struct iio_dev *indio_dev) | 58 | void hid_sensor_remove_trigger(struct hid_sensor_common *attrb) |
59 | { | 59 | { |
60 | iio_trigger_unregister(indio_dev->trig); | 60 | iio_trigger_unregister(attrb->trigger); |
61 | iio_trigger_free(indio_dev->trig); | 61 | iio_trigger_free(attrb->trigger); |
62 | indio_dev->trig = NULL; | ||
63 | } | 62 | } |
64 | EXPORT_SYMBOL(hid_sensor_remove_trigger); | 63 | EXPORT_SYMBOL(hid_sensor_remove_trigger); |
65 | 64 | ||
@@ -90,7 +89,7 @@ int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, | |||
90 | dev_err(&indio_dev->dev, "Trigger Register Failed\n"); | 89 | dev_err(&indio_dev->dev, "Trigger Register Failed\n"); |
91 | goto error_free_trig; | 90 | goto error_free_trig; |
92 | } | 91 | } |
93 | indio_dev->trig = trig; | 92 | indio_dev->trig = attrb->trigger = trig; |
94 | 93 | ||
95 | return ret; | 94 | return ret; |
96 | 95 | ||
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h index 9a8731478eda..ca02f7811aa8 100644 --- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.h +++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.h | |||
@@ -21,6 +21,6 @@ | |||
21 | 21 | ||
22 | int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, | 22 | int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, |
23 | struct hid_sensor_common *attrb); | 23 | struct hid_sensor_common *attrb); |
24 | void hid_sensor_remove_trigger(struct iio_dev *indio_dev); | 24 | void hid_sensor_remove_trigger(struct hid_sensor_common *attrb); |
25 | 25 | ||
26 | #endif | 26 | #endif |
diff --git a/drivers/iio/gyro/hid-sensor-gyro-3d.c b/drivers/iio/gyro/hid-sensor-gyro-3d.c index ea01c6bcfb56..e54f0f4959d3 100644 --- a/drivers/iio/gyro/hid-sensor-gyro-3d.c +++ b/drivers/iio/gyro/hid-sensor-gyro-3d.c | |||
@@ -348,7 +348,7 @@ static int hid_gyro_3d_probe(struct platform_device *pdev) | |||
348 | error_iio_unreg: | 348 | error_iio_unreg: |
349 | iio_device_unregister(indio_dev); | 349 | iio_device_unregister(indio_dev); |
350 | error_remove_trigger: | 350 | error_remove_trigger: |
351 | hid_sensor_remove_trigger(indio_dev); | 351 | hid_sensor_remove_trigger(&gyro_state->common_attributes); |
352 | error_unreg_buffer_funcs: | 352 | error_unreg_buffer_funcs: |
353 | iio_triggered_buffer_cleanup(indio_dev); | 353 | iio_triggered_buffer_cleanup(indio_dev); |
354 | error_free_dev_mem: | 354 | error_free_dev_mem: |
@@ -361,10 +361,11 @@ static int hid_gyro_3d_remove(struct platform_device *pdev) | |||
361 | { | 361 | { |
362 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; | 362 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; |
363 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 363 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
364 | struct gyro_3d_state *gyro_state = iio_priv(indio_dev); | ||
364 | 365 | ||
365 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_GYRO_3D); | 366 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_GYRO_3D); |
366 | iio_device_unregister(indio_dev); | 367 | iio_device_unregister(indio_dev); |
367 | hid_sensor_remove_trigger(indio_dev); | 368 | hid_sensor_remove_trigger(&gyro_state->common_attributes); |
368 | iio_triggered_buffer_cleanup(indio_dev); | 369 | iio_triggered_buffer_cleanup(indio_dev); |
369 | kfree(indio_dev->channels); | 370 | kfree(indio_dev->channels); |
370 | 371 | ||
diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig index f98c2b509254..b0d65df3ede2 100644 --- a/drivers/iio/light/Kconfig +++ b/drivers/iio/light/Kconfig | |||
@@ -81,6 +81,8 @@ config SENSORS_LM3533 | |||
81 | config TCS3472 | 81 | config TCS3472 |
82 | tristate "TAOS TCS3472 color light-to-digital converter" | 82 | tristate "TAOS TCS3472 color light-to-digital converter" |
83 | depends on I2C | 83 | depends on I2C |
84 | select IIO_BUFFER | ||
85 | select IIO_TRIGGERED_BUFFER | ||
84 | help | 86 | help |
85 | If you say yes here you get support for the TAOS TCS3472 | 87 | If you say yes here you get support for the TAOS TCS3472 |
86 | family of color light-to-digital converters with IR filter. | 88 | family of color light-to-digital converters with IR filter. |
diff --git a/drivers/iio/light/hid-sensor-als.c b/drivers/iio/light/hid-sensor-als.c index fa6ae8cf89ea..8e8b9d722853 100644 --- a/drivers/iio/light/hid-sensor-als.c +++ b/drivers/iio/light/hid-sensor-als.c | |||
@@ -314,7 +314,7 @@ static int hid_als_probe(struct platform_device *pdev) | |||
314 | error_iio_unreg: | 314 | error_iio_unreg: |
315 | iio_device_unregister(indio_dev); | 315 | iio_device_unregister(indio_dev); |
316 | error_remove_trigger: | 316 | error_remove_trigger: |
317 | hid_sensor_remove_trigger(indio_dev); | 317 | hid_sensor_remove_trigger(&als_state->common_attributes); |
318 | error_unreg_buffer_funcs: | 318 | error_unreg_buffer_funcs: |
319 | iio_triggered_buffer_cleanup(indio_dev); | 319 | iio_triggered_buffer_cleanup(indio_dev); |
320 | error_free_dev_mem: | 320 | error_free_dev_mem: |
@@ -327,10 +327,11 @@ static int hid_als_remove(struct platform_device *pdev) | |||
327 | { | 327 | { |
328 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; | 328 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; |
329 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 329 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
330 | struct als_state *als_state = iio_priv(indio_dev); | ||
330 | 331 | ||
331 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ALS); | 332 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ALS); |
332 | iio_device_unregister(indio_dev); | 333 | iio_device_unregister(indio_dev); |
333 | hid_sensor_remove_trigger(indio_dev); | 334 | hid_sensor_remove_trigger(&als_state->common_attributes); |
334 | iio_triggered_buffer_cleanup(indio_dev); | 335 | iio_triggered_buffer_cleanup(indio_dev); |
335 | kfree(indio_dev->channels); | 336 | kfree(indio_dev->channels); |
336 | 337 | ||
diff --git a/drivers/iio/magnetometer/Kconfig b/drivers/iio/magnetometer/Kconfig index 0cf09637b35b..d86d226dcd67 100644 --- a/drivers/iio/magnetometer/Kconfig +++ b/drivers/iio/magnetometer/Kconfig | |||
@@ -19,6 +19,8 @@ config AK8975 | |||
19 | config MAG3110 | 19 | config MAG3110 |
20 | tristate "Freescale MAG3110 3-Axis Magnetometer" | 20 | tristate "Freescale MAG3110 3-Axis Magnetometer" |
21 | depends on I2C | 21 | depends on I2C |
22 | select IIO_BUFFER | ||
23 | select IIO_TRIGGERED_BUFFER | ||
22 | help | 24 | help |
23 | Say yes here to build support for the Freescale MAG3110 3-Axis | 25 | Say yes here to build support for the Freescale MAG3110 3-Axis |
24 | magnetometer. | 26 | magnetometer. |
diff --git a/drivers/iio/magnetometer/hid-sensor-magn-3d.c b/drivers/iio/magnetometer/hid-sensor-magn-3d.c index 2634920562fb..b26e1028a0a0 100644 --- a/drivers/iio/magnetometer/hid-sensor-magn-3d.c +++ b/drivers/iio/magnetometer/hid-sensor-magn-3d.c | |||
@@ -351,7 +351,7 @@ static int hid_magn_3d_probe(struct platform_device *pdev) | |||
351 | error_iio_unreg: | 351 | error_iio_unreg: |
352 | iio_device_unregister(indio_dev); | 352 | iio_device_unregister(indio_dev); |
353 | error_remove_trigger: | 353 | error_remove_trigger: |
354 | hid_sensor_remove_trigger(indio_dev); | 354 | hid_sensor_remove_trigger(&magn_state->common_attributes); |
355 | error_unreg_buffer_funcs: | 355 | error_unreg_buffer_funcs: |
356 | iio_triggered_buffer_cleanup(indio_dev); | 356 | iio_triggered_buffer_cleanup(indio_dev); |
357 | error_free_dev_mem: | 357 | error_free_dev_mem: |
@@ -364,10 +364,11 @@ static int hid_magn_3d_remove(struct platform_device *pdev) | |||
364 | { | 364 | { |
365 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; | 365 | struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; |
366 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); | 366 | struct iio_dev *indio_dev = platform_get_drvdata(pdev); |
367 | struct magn_3d_state *magn_state = iio_priv(indio_dev); | ||
367 | 368 | ||
368 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_COMPASS_3D); | 369 | sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_COMPASS_3D); |
369 | iio_device_unregister(indio_dev); | 370 | iio_device_unregister(indio_dev); |
370 | hid_sensor_remove_trigger(indio_dev); | 371 | hid_sensor_remove_trigger(&magn_state->common_attributes); |
371 | iio_triggered_buffer_cleanup(indio_dev); | 372 | iio_triggered_buffer_cleanup(indio_dev); |
372 | kfree(indio_dev->channels); | 373 | kfree(indio_dev->channels); |
373 | 374 | ||
diff --git a/drivers/iio/magnetometer/mag3110.c b/drivers/iio/magnetometer/mag3110.c index 783c5b417356..becf54496967 100644 --- a/drivers/iio/magnetometer/mag3110.c +++ b/drivers/iio/magnetometer/mag3110.c | |||
@@ -250,7 +250,12 @@ done: | |||
250 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SAMP_FREQ) | \ | 250 | .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SAMP_FREQ) | \ |
251 | BIT(IIO_CHAN_INFO_SCALE), \ | 251 | BIT(IIO_CHAN_INFO_SCALE), \ |
252 | .scan_index = idx, \ | 252 | .scan_index = idx, \ |
253 | .scan_type = IIO_ST('s', 16, 16, IIO_BE), \ | 253 | .scan_type = { \ |
254 | .sign = 's', \ | ||
255 | .realbits = 16, \ | ||
256 | .storagebits = 16, \ | ||
257 | .endianness = IIO_BE, \ | ||
258 | }, \ | ||
254 | } | 259 | } |
255 | 260 | ||
256 | static const struct iio_chan_spec mag3110_channels[] = { | 261 | static const struct iio_chan_spec mag3110_channels[] = { |
diff --git a/drivers/staging/btmtk_usb/btmtk_usb.c b/drivers/staging/btmtk_usb/btmtk_usb.c index 7a9bf3b57810..9a5ebd6cc512 100644 --- a/drivers/staging/btmtk_usb/btmtk_usb.c +++ b/drivers/staging/btmtk_usb/btmtk_usb.c | |||
@@ -1284,9 +1284,8 @@ done: | |||
1284 | kfree_skb(skb); | 1284 | kfree_skb(skb); |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | static int btmtk_usb_send_frame(struct sk_buff *skb) | 1287 | static int btmtk_usb_send_frame(struct hci_dev *hdev, struct sk_buff *skb) |
1288 | { | 1288 | { |
1289 | struct hci_dev *hdev = (struct hci_dev *)skb->dev; | ||
1290 | struct btmtk_usb_data *data = hci_get_drvdata(hdev); | 1289 | struct btmtk_usb_data *data = hci_get_drvdata(hdev); |
1291 | struct usb_ctrlrequest *dr; | 1290 | struct usb_ctrlrequest *dr; |
1292 | struct urb *urb; | 1291 | struct urb *urb; |
diff --git a/drivers/staging/comedi/drivers/pcl730.c b/drivers/staging/comedi/drivers/pcl730.c index d041b714db29..2baaf1db6fbf 100644 --- a/drivers/staging/comedi/drivers/pcl730.c +++ b/drivers/staging/comedi/drivers/pcl730.c | |||
@@ -173,11 +173,11 @@ static int pcl730_do_insn_bits(struct comedi_device *dev, | |||
173 | if (mask) { | 173 | if (mask) { |
174 | if (mask & 0x00ff) | 174 | if (mask & 0x00ff) |
175 | outb(s->state & 0xff, dev->iobase + reg); | 175 | outb(s->state & 0xff, dev->iobase + reg); |
176 | if ((mask & 0xff00) & (s->n_chan > 8)) | 176 | if ((mask & 0xff00) && (s->n_chan > 8)) |
177 | outb((s->state >> 8) & 0xff, dev->iobase + reg + 1); | 177 | outb((s->state >> 8) & 0xff, dev->iobase + reg + 1); |
178 | if ((mask & 0xff0000) & (s->n_chan > 16)) | 178 | if ((mask & 0xff0000) && (s->n_chan > 16)) |
179 | outb((s->state >> 16) & 0xff, dev->iobase + reg + 2); | 179 | outb((s->state >> 16) & 0xff, dev->iobase + reg + 2); |
180 | if ((mask & 0xff000000) & (s->n_chan > 24)) | 180 | if ((mask & 0xff000000) && (s->n_chan > 24)) |
181 | outb((s->state >> 24) & 0xff, dev->iobase + reg + 3); | 181 | outb((s->state >> 24) & 0xff, dev->iobase + reg + 3); |
182 | } | 182 | } |
183 | 183 | ||
diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 6815cfe2664e..b486099b543d 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c | |||
@@ -494,7 +494,7 @@ static void s626_send_dac(struct comedi_device *dev, uint32_t val) | |||
494 | * Private helper function: Write setpoint to an application DAC channel. | 494 | * Private helper function: Write setpoint to an application DAC channel. |
495 | */ | 495 | */ |
496 | static void s626_set_dac(struct comedi_device *dev, uint16_t chan, | 496 | static void s626_set_dac(struct comedi_device *dev, uint16_t chan, |
497 | unsigned short dacdata) | 497 | int16_t dacdata) |
498 | { | 498 | { |
499 | struct s626_private *devpriv = dev->private; | 499 | struct s626_private *devpriv = dev->private; |
500 | uint16_t signmask; | 500 | uint16_t signmask; |
diff --git a/drivers/staging/comedi/drivers/vmk80xx.c b/drivers/staging/comedi/drivers/vmk80xx.c index 933b01a0f03d..0adf3cffddb0 100644 --- a/drivers/staging/comedi/drivers/vmk80xx.c +++ b/drivers/staging/comedi/drivers/vmk80xx.c | |||
@@ -465,7 +465,7 @@ static int vmk80xx_do_insn_bits(struct comedi_device *dev, | |||
465 | unsigned char *rx_buf = devpriv->usb_rx_buf; | 465 | unsigned char *rx_buf = devpriv->usb_rx_buf; |
466 | unsigned char *tx_buf = devpriv->usb_tx_buf; | 466 | unsigned char *tx_buf = devpriv->usb_tx_buf; |
467 | int reg, cmd; | 467 | int reg, cmd; |
468 | int ret; | 468 | int ret = 0; |
469 | 469 | ||
470 | if (devpriv->model == VMK8061_MODEL) { | 470 | if (devpriv->model == VMK8061_MODEL) { |
471 | reg = VMK8061_DO_REG; | 471 | reg = VMK8061_DO_REG; |
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c index 68ded17c0f5c..12f333fa59b5 100644 --- a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c +++ b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c | |||
@@ -578,7 +578,7 @@ static int request_code_segment(struct ft1000_usb *ft1000dev, u16 **s_file, | |||
578 | u8 **c_file, const u8 *endpoint, bool boot_case) | 578 | u8 **c_file, const u8 *endpoint, bool boot_case) |
579 | { | 579 | { |
580 | long word_length; | 580 | long word_length; |
581 | int status; | 581 | int status = 0; |
582 | 582 | ||
583 | /*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/ | 583 | /*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/ |
584 | word_length = get_request_value(ft1000dev); | 584 | word_length = get_request_value(ft1000dev); |
@@ -1074,4 +1074,3 @@ int scram_dnldr(struct ft1000_usb *ft1000dev, void *pFileStart, | |||
1074 | 1074 | ||
1075 | return status; | 1075 | return status; |
1076 | } | 1076 | } |
1077 | |||
diff --git a/drivers/staging/iio/magnetometer/Kconfig b/drivers/staging/iio/magnetometer/Kconfig index a3ea69e9d800..34634da1f9f7 100644 --- a/drivers/staging/iio/magnetometer/Kconfig +++ b/drivers/staging/iio/magnetometer/Kconfig | |||
@@ -6,6 +6,8 @@ menu "Magnetometer sensors" | |||
6 | config SENSORS_HMC5843 | 6 | config SENSORS_HMC5843 |
7 | tristate "Honeywell HMC5843/5883/5883L 3-Axis Magnetometer" | 7 | tristate "Honeywell HMC5843/5883/5883L 3-Axis Magnetometer" |
8 | depends on I2C | 8 | depends on I2C |
9 | select IIO_BUFFER | ||
10 | select IIO_TRIGGERED_BUFFER | ||
9 | help | 11 | help |
10 | Say Y here to add support for the Honeywell HMC5843, HMC5883 and | 12 | Say Y here to add support for the Honeywell HMC5843, HMC5883 and |
11 | HMC5883L 3-Axis Magnetometer (digital compass). | 13 | HMC5883L 3-Axis Magnetometer (digital compass). |
diff --git a/drivers/staging/imx-drm/Makefile b/drivers/staging/imx-drm/Makefile index 2c3a9e178fb5..8742432d7b01 100644 --- a/drivers/staging/imx-drm/Makefile +++ b/drivers/staging/imx-drm/Makefile | |||
@@ -8,4 +8,6 @@ obj-$(CONFIG_DRM_IMX_TVE) += imx-tve.o | |||
8 | obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o | 8 | obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o |
9 | obj-$(CONFIG_DRM_IMX_FB_HELPER) += imx-fbdev.o | 9 | obj-$(CONFIG_DRM_IMX_FB_HELPER) += imx-fbdev.o |
10 | obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += ipu-v3/ | 10 | obj-$(CONFIG_DRM_IMX_IPUV3_CORE) += ipu-v3/ |
11 | obj-$(CONFIG_DRM_IMX_IPUV3) += ipuv3-crtc.o ipuv3-plane.o | 11 | |
12 | imx-ipuv3-crtc-objs := ipuv3-crtc.o ipuv3-plane.o | ||
13 | obj-$(CONFIG_DRM_IMX_IPUV3) += imx-ipuv3-crtc.o | ||
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 51aa9772f959..6bd015ac9d68 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c | |||
@@ -72,6 +72,7 @@ int imx_drm_crtc_id(struct imx_drm_crtc *crtc) | |||
72 | { | 72 | { |
73 | return crtc->pipe; | 73 | return crtc->pipe; |
74 | } | 74 | } |
75 | EXPORT_SYMBOL_GPL(imx_drm_crtc_id); | ||
75 | 76 | ||
76 | static void imx_drm_driver_lastclose(struct drm_device *drm) | 77 | static void imx_drm_driver_lastclose(struct drm_device *drm) |
77 | { | 78 | { |
diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c index 5dec771d70ee..4d340f4a2198 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c | |||
@@ -409,8 +409,8 @@ int ptlrpc_stop_pinger(void) | |||
409 | struct l_wait_info lwi = { 0 }; | 409 | struct l_wait_info lwi = { 0 }; |
410 | int rc = 0; | 410 | int rc = 0; |
411 | 411 | ||
412 | if (!thread_is_init(&pinger_thread) && | 412 | if (thread_is_init(&pinger_thread) || |
413 | !thread_is_stopped(&pinger_thread)) | 413 | thread_is_stopped(&pinger_thread)) |
414 | return -EALREADY; | 414 | return -EALREADY; |
415 | 415 | ||
416 | ptlrpc_pinger_remove_timeouts(); | 416 | ptlrpc_pinger_remove_timeouts(); |
diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c index 58684da45e6c..b658c2316df3 100644 --- a/drivers/staging/media/go7007/go7007-usb.c +++ b/drivers/staging/media/go7007/go7007-usb.c | |||
@@ -15,6 +15,8 @@ | |||
15 | * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 15 | * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
19 | |||
18 | #include <linux/module.h> | 20 | #include <linux/module.h> |
19 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 22 | #include <linux/init.h> |
@@ -661,7 +663,7 @@ static int go7007_usb_interface_reset(struct go7007 *go) | |||
661 | 663 | ||
662 | if (usb->board->flags & GO7007_USB_EZUSB) { | 664 | if (usb->board->flags & GO7007_USB_EZUSB) { |
663 | /* Reset buffer in EZ-USB */ | 665 | /* Reset buffer in EZ-USB */ |
664 | dev_dbg(go->dev, "resetting EZ-USB buffers\n"); | 666 | pr_debug("resetting EZ-USB buffers\n"); |
665 | if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 || | 667 | if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 || |
666 | go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0) | 668 | go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0) |
667 | return -1; | 669 | return -1; |
@@ -689,7 +691,7 @@ static int go7007_usb_ezusb_write_interrupt(struct go7007 *go, | |||
689 | u16 status_reg = 0; | 691 | u16 status_reg = 0; |
690 | int timeout = 500; | 692 | int timeout = 500; |
691 | 693 | ||
692 | dev_dbg(go->dev, "WriteInterrupt: %04x %04x\n", addr, data); | 694 | pr_debug("WriteInterrupt: %04x %04x\n", addr, data); |
693 | 695 | ||
694 | for (i = 0; i < 100; ++i) { | 696 | for (i = 0; i < 100; ++i) { |
695 | r = usb_control_msg(usb->usbdev, | 697 | r = usb_control_msg(usb->usbdev, |
@@ -734,7 +736,7 @@ static int go7007_usb_onboard_write_interrupt(struct go7007 *go, | |||
734 | int r; | 736 | int r; |
735 | int timeout = 500; | 737 | int timeout = 500; |
736 | 738 | ||
737 | dev_dbg(go->dev, "WriteInterrupt: %04x %04x\n", addr, data); | 739 | pr_debug("WriteInterrupt: %04x %04x\n", addr, data); |
738 | 740 | ||
739 | go->usb_buf[0] = data & 0xff; | 741 | go->usb_buf[0] = data & 0xff; |
740 | go->usb_buf[1] = data >> 8; | 742 | go->usb_buf[1] = data >> 8; |
@@ -771,7 +773,7 @@ static void go7007_usb_readinterrupt_complete(struct urb *urb) | |||
771 | go->interrupt_available = 1; | 773 | go->interrupt_available = 1; |
772 | go->interrupt_data = __le16_to_cpu(regs[0]); | 774 | go->interrupt_data = __le16_to_cpu(regs[0]); |
773 | go->interrupt_value = __le16_to_cpu(regs[1]); | 775 | go->interrupt_value = __le16_to_cpu(regs[1]); |
774 | dev_dbg(go->dev, "ReadInterrupt: %04x %04x\n", | 776 | pr_debug("ReadInterrupt: %04x %04x\n", |
775 | go->interrupt_value, go->interrupt_data); | 777 | go->interrupt_value, go->interrupt_data); |
776 | } | 778 | } |
777 | 779 | ||
@@ -891,7 +893,7 @@ static int go7007_usb_send_firmware(struct go7007 *go, u8 *data, int len) | |||
891 | int transferred, pipe; | 893 | int transferred, pipe; |
892 | int timeout = 500; | 894 | int timeout = 500; |
893 | 895 | ||
894 | dev_dbg(go->dev, "DownloadBuffer sending %d bytes\n", len); | 896 | pr_debug("DownloadBuffer sending %d bytes\n", len); |
895 | 897 | ||
896 | if (usb->board->flags & GO7007_USB_EZUSB) | 898 | if (usb->board->flags & GO7007_USB_EZUSB) |
897 | pipe = usb_sndbulkpipe(usb->usbdev, 2); | 899 | pipe = usb_sndbulkpipe(usb->usbdev, 2); |
@@ -977,7 +979,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter, | |||
977 | !(msgs[i].flags & I2C_M_RD) && | 979 | !(msgs[i].flags & I2C_M_RD) && |
978 | (msgs[i + 1].flags & I2C_M_RD)) { | 980 | (msgs[i + 1].flags & I2C_M_RD)) { |
979 | #ifdef GO7007_I2C_DEBUG | 981 | #ifdef GO7007_I2C_DEBUG |
980 | dev_dbg(go->dev, "i2c write/read %d/%d bytes on %02x\n", | 982 | pr_debug("i2c write/read %d/%d bytes on %02x\n", |
981 | msgs[i].len, msgs[i + 1].len, msgs[i].addr); | 983 | msgs[i].len, msgs[i + 1].len, msgs[i].addr); |
982 | #endif | 984 | #endif |
983 | buf[0] = 0x01; | 985 | buf[0] = 0x01; |
@@ -988,7 +990,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter, | |||
988 | buf[buf_len++] = msgs[++i].len; | 990 | buf[buf_len++] = msgs[++i].len; |
989 | } else if (msgs[i].flags & I2C_M_RD) { | 991 | } else if (msgs[i].flags & I2C_M_RD) { |
990 | #ifdef GO7007_I2C_DEBUG | 992 | #ifdef GO7007_I2C_DEBUG |
991 | dev_dbg(go->dev, "i2c read %d bytes on %02x\n", | 993 | pr_debug("i2c read %d bytes on %02x\n", |
992 | msgs[i].len, msgs[i].addr); | 994 | msgs[i].len, msgs[i].addr); |
993 | #endif | 995 | #endif |
994 | buf[0] = 0x01; | 996 | buf[0] = 0x01; |
@@ -998,7 +1000,7 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter, | |||
998 | buf_len = 4; | 1000 | buf_len = 4; |
999 | } else { | 1001 | } else { |
1000 | #ifdef GO7007_I2C_DEBUG | 1002 | #ifdef GO7007_I2C_DEBUG |
1001 | dev_dbg(go->dev, "i2c write %d bytes on %02x\n", | 1003 | pr_debug("i2c write %d bytes on %02x\n", |
1002 | msgs[i].len, msgs[i].addr); | 1004 | msgs[i].len, msgs[i].addr); |
1003 | #endif | 1005 | #endif |
1004 | buf[0] = 0x00; | 1006 | buf[0] = 0x00; |
@@ -1057,7 +1059,7 @@ static int go7007_usb_probe(struct usb_interface *intf, | |||
1057 | char *name; | 1059 | char *name; |
1058 | int video_pipe, i, v_urb_len; | 1060 | int video_pipe, i, v_urb_len; |
1059 | 1061 | ||
1060 | dev_dbg(go->dev, "probing new GO7007 USB board\n"); | 1062 | pr_debug("probing new GO7007 USB board\n"); |
1061 | 1063 | ||
1062 | switch (id->driver_info) { | 1064 | switch (id->driver_info) { |
1063 | case GO7007_BOARDID_MATRIX_II: | 1065 | case GO7007_BOARDID_MATRIX_II: |
@@ -1097,13 +1099,13 @@ static int go7007_usb_probe(struct usb_interface *intf, | |||
1097 | board = &board_px_tv402u; | 1099 | board = &board_px_tv402u; |
1098 | break; | 1100 | break; |
1099 | case GO7007_BOARDID_LIFEVIEW_LR192: | 1101 | case GO7007_BOARDID_LIFEVIEW_LR192: |
1100 | dev_err(go->dev, "The Lifeview TV Walker Ultra is not supported. Sorry!\n"); | 1102 | dev_err(&intf->dev, "The Lifeview TV Walker Ultra is not supported. Sorry!\n"); |
1101 | return -ENODEV; | 1103 | return -ENODEV; |
1102 | name = "Lifeview TV Walker Ultra"; | 1104 | name = "Lifeview TV Walker Ultra"; |
1103 | board = &board_lifeview_lr192; | 1105 | board = &board_lifeview_lr192; |
1104 | break; | 1106 | break; |
1105 | case GO7007_BOARDID_SENSORAY_2250: | 1107 | case GO7007_BOARDID_SENSORAY_2250: |
1106 | dev_info(go->dev, "Sensoray 2250 found\n"); | 1108 | dev_info(&intf->dev, "Sensoray 2250 found\n"); |
1107 | name = "Sensoray 2250/2251"; | 1109 | name = "Sensoray 2250/2251"; |
1108 | board = &board_sensoray_2250; | 1110 | board = &board_sensoray_2250; |
1109 | break; | 1111 | break; |
@@ -1112,7 +1114,7 @@ static int go7007_usb_probe(struct usb_interface *intf, | |||
1112 | board = &board_ads_usbav_709; | 1114 | board = &board_ads_usbav_709; |
1113 | break; | 1115 | break; |
1114 | default: | 1116 | default: |
1115 | dev_err(go->dev, "unknown board ID %d!\n", | 1117 | dev_err(&intf->dev, "unknown board ID %d!\n", |
1116 | (unsigned int)id->driver_info); | 1118 | (unsigned int)id->driver_info); |
1117 | return -ENODEV; | 1119 | return -ENODEV; |
1118 | } | 1120 | } |
@@ -1247,7 +1249,7 @@ static int go7007_usb_probe(struct usb_interface *intf, | |||
1247 | sizeof(go->name)); | 1249 | sizeof(go->name)); |
1248 | break; | 1250 | break; |
1249 | default: | 1251 | default: |
1250 | dev_dbg(go->dev, "unable to detect tuner type!\n"); | 1252 | pr_debug("unable to detect tuner type!\n"); |
1251 | break; | 1253 | break; |
1252 | } | 1254 | } |
1253 | /* Configure tuner mode selection inputs connected | 1255 | /* Configure tuner mode selection inputs connected |
diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 3066ee2e753b..49ea76b3435d 100644 --- a/drivers/staging/nvec/nvec.c +++ b/drivers/staging/nvec/nvec.c | |||
@@ -681,7 +681,8 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) | |||
681 | dev_err(nvec->dev, | 681 | dev_err(nvec->dev, |
682 | "RX buffer overflow on %p: " | 682 | "RX buffer overflow on %p: " |
683 | "Trying to write byte %u of %u\n", | 683 | "Trying to write byte %u of %u\n", |
684 | nvec->rx, nvec->rx->pos, NVEC_MSG_SIZE); | 684 | nvec->rx, nvec->rx ? nvec->rx->pos : 0, |
685 | NVEC_MSG_SIZE); | ||
685 | break; | 686 | break; |
686 | default: | 687 | default: |
687 | nvec->state = 0; | 688 | nvec->state = 0; |
diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 2c678f409573..2f548ebada59 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c | |||
@@ -1115,6 +1115,9 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) | |||
1115 | return _FAIL; | 1115 | return _FAIL; |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | /* fix bug of flush_cam_entry at STOP AP mode */ | ||
1119 | psta->state |= WIFI_AP_STATE; | ||
1120 | rtw_indicate_connect(padapter); | ||
1118 | pmlmepriv->cur_network.join_res = true;/* for check if already set beacon */ | 1121 | pmlmepriv->cur_network.join_res = true;/* for check if already set beacon */ |
1119 | return ret; | 1122 | return ret; |
1120 | } | 1123 | } |
diff --git a/drivers/staging/tidspbridge/Kconfig b/drivers/staging/tidspbridge/Kconfig index 165b918b8171..1b6d581c438b 100644 --- a/drivers/staging/tidspbridge/Kconfig +++ b/drivers/staging/tidspbridge/Kconfig | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | menuconfig TIDSPBRIDGE | 5 | menuconfig TIDSPBRIDGE |
6 | tristate "DSP Bridge driver" | 6 | tristate "DSP Bridge driver" |
7 | depends on ARCH_OMAP3 && !ARCH_MULTIPLATFORM | 7 | depends on ARCH_OMAP3 && !ARCH_MULTIPLATFORM && BROKEN |
8 | select MAILBOX | 8 | select MAILBOX |
9 | select OMAP2PLUS_MBOX | 9 | select OMAP2PLUS_MBOX |
10 | help | 10 | help |
diff --git a/drivers/staging/vt6655/hostap.c b/drivers/staging/vt6655/hostap.c index aab0012bba92..ab8b2ba6eedd 100644 --- a/drivers/staging/vt6655/hostap.c +++ b/drivers/staging/vt6655/hostap.c | |||
@@ -143,7 +143,8 @@ static int hostap_disable_hostapd(PSDevice pDevice, int rtnl_locked) | |||
143 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", | 143 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", |
144 | pDevice->dev->name, pDevice->apdev->name); | 144 | pDevice->dev->name, pDevice->apdev->name); |
145 | } | 145 | } |
146 | free_netdev(pDevice->apdev); | 146 | if (pDevice->apdev) |
147 | free_netdev(pDevice->apdev); | ||
147 | pDevice->apdev = NULL; | 148 | pDevice->apdev = NULL; |
148 | pDevice->bEnable8021x = false; | 149 | pDevice->bEnable8021x = false; |
149 | pDevice->bEnableHostWEP = false; | 150 | pDevice->bEnableHostWEP = false; |
diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index 1e8b8412e67e..4aa5ef54b683 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c | |||
@@ -939,6 +939,7 @@ int BBbVT3184Init(struct vnt_private *pDevice) | |||
939 | u8 * pbyAgc; | 939 | u8 * pbyAgc; |
940 | u16 wLengthAgc; | 940 | u16 wLengthAgc; |
941 | u8 abyArray[256]; | 941 | u8 abyArray[256]; |
942 | u8 data; | ||
942 | 943 | ||
943 | ntStatus = CONTROLnsRequestIn(pDevice, | 944 | ntStatus = CONTROLnsRequestIn(pDevice, |
944 | MESSAGE_TYPE_READ, | 945 | MESSAGE_TYPE_READ, |
@@ -1104,6 +1105,16 @@ else { | |||
1104 | ControlvWriteByte(pDevice,MESSAGE_REQUEST_BBREG,0x0D,0x01); | 1105 | ControlvWriteByte(pDevice,MESSAGE_REQUEST_BBREG,0x0D,0x01); |
1105 | 1106 | ||
1106 | RFbRFTableDownload(pDevice); | 1107 | RFbRFTableDownload(pDevice); |
1108 | |||
1109 | /* Fix for TX USB resets from vendors driver */ | ||
1110 | CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, USB_REG4, | ||
1111 | MESSAGE_REQUEST_MEM, sizeof(data), &data); | ||
1112 | |||
1113 | data |= 0x2; | ||
1114 | |||
1115 | CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, USB_REG4, | ||
1116 | MESSAGE_REQUEST_MEM, sizeof(data), &data); | ||
1117 | |||
1107 | return true;//ntStatus; | 1118 | return true;//ntStatus; |
1108 | } | 1119 | } |
1109 | 1120 | ||
diff --git a/drivers/staging/vt6656/hostap.c b/drivers/staging/vt6656/hostap.c index ae1676d190c5..67ba48b9a8d9 100644 --- a/drivers/staging/vt6656/hostap.c +++ b/drivers/staging/vt6656/hostap.c | |||
@@ -133,7 +133,8 @@ static int hostap_disable_hostapd(struct vnt_private *pDevice, int rtnl_locked) | |||
133 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", | 133 | DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", |
134 | pDevice->dev->name, pDevice->apdev->name); | 134 | pDevice->dev->name, pDevice->apdev->name); |
135 | } | 135 | } |
136 | free_netdev(pDevice->apdev); | 136 | if (pDevice->apdev) |
137 | free_netdev(pDevice->apdev); | ||
137 | pDevice->apdev = NULL; | 138 | pDevice->apdev = NULL; |
138 | pDevice->bEnable8021x = false; | 139 | pDevice->bEnable8021x = false; |
139 | pDevice->bEnableHostWEP = false; | 140 | pDevice->bEnableHostWEP = false; |
diff --git a/drivers/staging/vt6656/rndis.h b/drivers/staging/vt6656/rndis.h index 5e073062017a..5cf5e732a36f 100644 --- a/drivers/staging/vt6656/rndis.h +++ b/drivers/staging/vt6656/rndis.h | |||
@@ -66,6 +66,8 @@ | |||
66 | 66 | ||
67 | #define VIAUSB20_PACKET_HEADER 0x04 | 67 | #define VIAUSB20_PACKET_HEADER 0x04 |
68 | 68 | ||
69 | #define USB_REG4 0x604 | ||
70 | |||
69 | typedef struct _CMD_MESSAGE | 71 | typedef struct _CMD_MESSAGE |
70 | { | 72 | { |
71 | u8 byData[256]; | 73 | u8 byData[256]; |
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c index 79ce363b2ea9..3277d9838f4e 100644 --- a/drivers/staging/zram/zram_drv.c +++ b/drivers/staging/zram/zram_drv.c | |||
@@ -652,21 +652,30 @@ static ssize_t reset_store(struct device *dev, | |||
652 | return -ENOMEM; | 652 | return -ENOMEM; |
653 | 653 | ||
654 | /* Do not reset an active device! */ | 654 | /* Do not reset an active device! */ |
655 | if (bdev->bd_holders) | 655 | if (bdev->bd_holders) { |
656 | return -EBUSY; | 656 | ret = -EBUSY; |
657 | goto out; | ||
658 | } | ||
657 | 659 | ||
658 | ret = kstrtou16(buf, 10, &do_reset); | 660 | ret = kstrtou16(buf, 10, &do_reset); |
659 | if (ret) | 661 | if (ret) |
660 | return ret; | 662 | goto out; |
661 | 663 | ||
662 | if (!do_reset) | 664 | if (!do_reset) { |
663 | return -EINVAL; | 665 | ret = -EINVAL; |
666 | goto out; | ||
667 | } | ||
664 | 668 | ||
665 | /* Make sure all pending I/O is finished */ | 669 | /* Make sure all pending I/O is finished */ |
666 | fsync_bdev(bdev); | 670 | fsync_bdev(bdev); |
671 | bdput(bdev); | ||
667 | 672 | ||
668 | zram_reset_device(zram, true); | 673 | zram_reset_device(zram, true); |
669 | return len; | 674 | return len; |
675 | |||
676 | out: | ||
677 | bdput(bdev); | ||
678 | return ret; | ||
670 | } | 679 | } |
671 | 680 | ||
672 | static void __zram_make_request(struct zram *zram, struct bio *bio, int rw) | 681 | static void __zram_make_request(struct zram *zram, struct bio *bio, int rw) |
diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c b/drivers/staging/zsmalloc/zsmalloc-main.c index 1a67537dbc56..3b950e5a918f 100644 --- a/drivers/staging/zsmalloc/zsmalloc-main.c +++ b/drivers/staging/zsmalloc/zsmalloc-main.c | |||
@@ -430,7 +430,12 @@ static struct page *get_next_page(struct page *page) | |||
430 | return next; | 430 | return next; |
431 | } | 431 | } |
432 | 432 | ||
433 | /* Encode <page, obj_idx> as a single handle value */ | 433 | /* |
434 | * Encode <page, obj_idx> as a single handle value. | ||
435 | * On hardware platforms with physical memory starting at 0x0 the pfn | ||
436 | * could be 0 so we ensure that the handle will never be 0 by adjusting the | ||
437 | * encoded obj_idx value before encoding. | ||
438 | */ | ||
434 | static void *obj_location_to_handle(struct page *page, unsigned long obj_idx) | 439 | static void *obj_location_to_handle(struct page *page, unsigned long obj_idx) |
435 | { | 440 | { |
436 | unsigned long handle; | 441 | unsigned long handle; |
@@ -441,17 +446,21 @@ static void *obj_location_to_handle(struct page *page, unsigned long obj_idx) | |||
441 | } | 446 | } |
442 | 447 | ||
443 | handle = page_to_pfn(page) << OBJ_INDEX_BITS; | 448 | handle = page_to_pfn(page) << OBJ_INDEX_BITS; |
444 | handle |= (obj_idx & OBJ_INDEX_MASK); | 449 | handle |= ((obj_idx + 1) & OBJ_INDEX_MASK); |
445 | 450 | ||
446 | return (void *)handle; | 451 | return (void *)handle; |
447 | } | 452 | } |
448 | 453 | ||
449 | /* Decode <page, obj_idx> pair from the given object handle */ | 454 | /* |
455 | * Decode <page, obj_idx> pair from the given object handle. We adjust the | ||
456 | * decoded obj_idx back to its original value since it was adjusted in | ||
457 | * obj_location_to_handle(). | ||
458 | */ | ||
450 | static void obj_handle_to_location(unsigned long handle, struct page **page, | 459 | static void obj_handle_to_location(unsigned long handle, struct page **page, |
451 | unsigned long *obj_idx) | 460 | unsigned long *obj_idx) |
452 | { | 461 | { |
453 | *page = pfn_to_page(handle >> OBJ_INDEX_BITS); | 462 | *page = pfn_to_page(handle >> OBJ_INDEX_BITS); |
454 | *obj_idx = handle & OBJ_INDEX_MASK; | 463 | *obj_idx = (handle & OBJ_INDEX_MASK) - 1; |
455 | } | 464 | } |
456 | 465 | ||
457 | static unsigned long obj_idx_to_offset(struct page *page, | 466 | static unsigned long obj_idx_to_offset(struct page *page, |
diff --git a/include/linux/hid-sensor-hub.h b/include/linux/hid-sensor-hub.h index a265af294ea4..206a2af6b62b 100644 --- a/include/linux/hid-sensor-hub.h +++ b/include/linux/hid-sensor-hub.h | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #include <linux/hid.h> | 22 | #include <linux/hid.h> |
23 | #include <linux/hid-sensor-ids.h> | 23 | #include <linux/hid-sensor-ids.h> |
24 | #include <linux/iio/iio.h> | ||
25 | #include <linux/iio/trigger.h> | ||
24 | 26 | ||
25 | /** | 27 | /** |
26 | * struct hid_sensor_hub_attribute_info - Attribute info | 28 | * struct hid_sensor_hub_attribute_info - Attribute info |
@@ -184,6 +186,7 @@ struct hid_sensor_common { | |||
184 | struct platform_device *pdev; | 186 | struct platform_device *pdev; |
185 | unsigned usage_id; | 187 | unsigned usage_id; |
186 | bool data_ready; | 188 | bool data_ready; |
189 | struct iio_trigger *trigger; | ||
187 | struct hid_sensor_hub_attribute_info poll; | 190 | struct hid_sensor_hub_attribute_info poll; |
188 | struct hid_sensor_hub_attribute_info report_state; | 191 | struct hid_sensor_hub_attribute_info report_state; |
189 | struct hid_sensor_hub_attribute_info power_state; | 192 | struct hid_sensor_hub_attribute_info power_state; |