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.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
"Here are a number of staging, and IIO driver, fixes for 3.13-rc2 that
resolve issues that have been reported for 3.13-rc1. All of these
have been in linux-next for a bit this week"

* tag 'staging-3.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (25 commits)
Staging: tidspbridge: disable driver
staging: zsmalloc: Ensure handle is never 0 on success
staging/lustre/ptlrpc: fix ptlrpc_stop_pinger logic
staging: r8188eu: Fix AP mode
Staging: btmtk_usb: Add hdev parameter to hdev->send driver callback
Staging: go7007: fix up some remaining go->dev issues
staging: imx-drm: Fix modular build of DRM_IMX_IPUV3
staging: ft1000: fix use of potentially uninitialized variable
Revert "staging:media: Use dev_dbg() instead of pr_debug()"
Staging: zram: Fix memory leak by refcount mismatch
staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
staging: nvec: potential NULL dereference on error path
Staging: vt6655-6: potential NULL dereference in hostap_disable_hostapd()
staging: comedi: s626: fix value written by s626_set_dac()
Staging: comedi: pcl730: fix some bitwise vs logical AND bugs
staging: comedi: fix potentially uninitialised variable
iio:accel:kxsd9 fix missing mutex unlock
iio: adc: ti_am335x_adc: avoid double free of buffer.
staging:iio: Fix hmc5843 Kconfig dependencies
iio: Fix tcs3472 Kconfig dependencies
...

+124 -62
+3 -2
drivers/iio/accel/hid-sensor-accel-3d.c
··· 350 350 error_iio_unreg: 351 351 iio_device_unregister(indio_dev); 352 352 error_remove_trigger: 353 - hid_sensor_remove_trigger(indio_dev); 353 + hid_sensor_remove_trigger(&accel_state->common_attributes); 354 354 error_unreg_buffer_funcs: 355 355 iio_triggered_buffer_cleanup(indio_dev); 356 356 error_free_dev_mem: ··· 363 363 { 364 364 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 365 365 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 366 + struct accel_3d_state *accel_state = iio_priv(indio_dev); 366 367 367 368 sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ACCEL_3D); 368 369 iio_device_unregister(indio_dev); 369 - hid_sensor_remove_trigger(indio_dev); 370 + hid_sensor_remove_trigger(&accel_state->common_attributes); 370 371 iio_triggered_buffer_cleanup(indio_dev); 371 372 kfree(indio_dev->channels); 372 373
+4 -3
drivers/iio/accel/kxsd9.c
··· 112 112 mutex_lock(&st->buf_lock); 113 113 st->tx[0] = KXSD9_READ(address); 114 114 ret = spi_sync_transfer(st->us, xfers, ARRAY_SIZE(xfers)); 115 - if (ret) 116 - return ret; 117 - return (((u16)(st->rx[0])) << 8) | (st->rx[1] & 0xF0); 115 + if (!ret) 116 + ret = (((u16)(st->rx[0])) << 8) | (st->rx[1] & 0xF0); 117 + mutex_unlock(&st->buf_lock); 118 + return ret; 118 119 } 119 120 120 121 static IIO_CONST_ATTR(accel_scale_available,
+1
drivers/iio/adc/at91_adc.c
··· 1047 1047 } else { 1048 1048 if (!st->caps->has_tsmr) { 1049 1049 dev_err(&pdev->dev, "We don't support non-TSMR adc\n"); 1050 + ret = -ENODEV; 1050 1051 goto error_disable_adc_clk; 1051 1052 } 1052 1053
+4 -4
drivers/iio/adc/mcp3422.c
··· 88 88 89 89 /* sample rates to sign extension table */ 90 90 static const int mcp3422_sign_extend[4] = { 91 - [MCP3422_SRATE_240] = 12, 92 - [MCP3422_SRATE_60] = 14, 93 - [MCP3422_SRATE_15] = 16, 94 - [MCP3422_SRATE_3] = 18 }; 91 + [MCP3422_SRATE_240] = 11, 92 + [MCP3422_SRATE_60] = 13, 93 + [MCP3422_SRATE_15] = 15, 94 + [MCP3422_SRATE_3] = 17 }; 95 95 96 96 /* Client data (each client gets its own) */ 97 97 struct mcp3422 {
+5 -2
drivers/iio/adc/ti_am335x_adc.c
··· 229 229 unsigned long flags, 230 230 const struct iio_buffer_setup_ops *setup_ops) 231 231 { 232 + struct iio_buffer *buffer; 232 233 int ret; 233 234 234 - indio_dev->buffer = iio_kfifo_allocate(indio_dev); 235 - if (!indio_dev->buffer) 235 + buffer = iio_kfifo_allocate(indio_dev); 236 + if (!buffer) 236 237 return -ENOMEM; 238 + 239 + iio_device_attach_buffer(indio_dev, buffer); 237 240 238 241 ret = request_threaded_irq(irq, pollfunc_th, pollfunc_bh, 239 242 flags, indio_dev->name, indio_dev);
+4 -5
drivers/iio/common/hid-sensors/hid-sensor-trigger.c
··· 55 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); 61 - iio_trigger_free(indio_dev->trig); 62 - indio_dev->trig = NULL; 60 + iio_trigger_unregister(attrb->trigger); 61 + iio_trigger_free(attrb->trigger); 63 62 } 64 63 EXPORT_SYMBOL(hid_sensor_remove_trigger); 65 64 ··· 89 90 dev_err(&indio_dev->dev, "Trigger Register Failed\n"); 90 91 goto error_free_trig; 91 92 } 92 - indio_dev->trig = trig; 93 + indio_dev->trig = attrb->trigger = trig; 93 94 94 95 return ret; 95 96
+1 -1
drivers/iio/common/hid-sensors/hid-sensor-trigger.h
··· 21 21 22 22 int hid_sensor_setup_trigger(struct iio_dev *indio_dev, const char *name, 23 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 26 #endif
+3 -2
drivers/iio/gyro/hid-sensor-gyro-3d.c
··· 348 348 error_iio_unreg: 349 349 iio_device_unregister(indio_dev); 350 350 error_remove_trigger: 351 - hid_sensor_remove_trigger(indio_dev); 351 + hid_sensor_remove_trigger(&gyro_state->common_attributes); 352 352 error_unreg_buffer_funcs: 353 353 iio_triggered_buffer_cleanup(indio_dev); 354 354 error_free_dev_mem: ··· 361 361 { 362 362 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 363 363 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 364 + struct gyro_3d_state *gyro_state = iio_priv(indio_dev); 364 365 365 366 sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_GYRO_3D); 366 367 iio_device_unregister(indio_dev); 367 - hid_sensor_remove_trigger(indio_dev); 368 + hid_sensor_remove_trigger(&gyro_state->common_attributes); 368 369 iio_triggered_buffer_cleanup(indio_dev); 369 370 kfree(indio_dev->channels); 370 371
+2
drivers/iio/light/Kconfig
··· 81 81 config TCS3472 82 82 tristate "TAOS TCS3472 color light-to-digital converter" 83 83 depends on I2C 84 + select IIO_BUFFER 85 + select IIO_TRIGGERED_BUFFER 84 86 help 85 87 If you say yes here you get support for the TAOS TCS3472 86 88 family of color light-to-digital converters with IR filter.
+3 -2
drivers/iio/light/hid-sensor-als.c
··· 314 314 error_iio_unreg: 315 315 iio_device_unregister(indio_dev); 316 316 error_remove_trigger: 317 - hid_sensor_remove_trigger(indio_dev); 317 + hid_sensor_remove_trigger(&als_state->common_attributes); 318 318 error_unreg_buffer_funcs: 319 319 iio_triggered_buffer_cleanup(indio_dev); 320 320 error_free_dev_mem: ··· 327 327 { 328 328 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 329 329 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 330 + struct als_state *als_state = iio_priv(indio_dev); 330 331 331 332 sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_ALS); 332 333 iio_device_unregister(indio_dev); 333 - hid_sensor_remove_trigger(indio_dev); 334 + hid_sensor_remove_trigger(&als_state->common_attributes); 334 335 iio_triggered_buffer_cleanup(indio_dev); 335 336 kfree(indio_dev->channels); 336 337
+2
drivers/iio/magnetometer/Kconfig
··· 19 19 config MAG3110 20 20 tristate "Freescale MAG3110 3-Axis Magnetometer" 21 21 depends on I2C 22 + select IIO_BUFFER 23 + select IIO_TRIGGERED_BUFFER 22 24 help 23 25 Say yes here to build support for the Freescale MAG3110 3-Axis 24 26 magnetometer.
+3 -2
drivers/iio/magnetometer/hid-sensor-magn-3d.c
··· 351 351 error_iio_unreg: 352 352 iio_device_unregister(indio_dev); 353 353 error_remove_trigger: 354 - hid_sensor_remove_trigger(indio_dev); 354 + hid_sensor_remove_trigger(&magn_state->common_attributes); 355 355 error_unreg_buffer_funcs: 356 356 iio_triggered_buffer_cleanup(indio_dev); 357 357 error_free_dev_mem: ··· 364 364 { 365 365 struct hid_sensor_hub_device *hsdev = pdev->dev.platform_data; 366 366 struct iio_dev *indio_dev = platform_get_drvdata(pdev); 367 + struct magn_3d_state *magn_state = iio_priv(indio_dev); 367 368 368 369 sensor_hub_remove_callback(hsdev, HID_USAGE_SENSOR_COMPASS_3D); 369 370 iio_device_unregister(indio_dev); 370 - hid_sensor_remove_trigger(indio_dev); 371 + hid_sensor_remove_trigger(&magn_state->common_attributes); 371 372 iio_triggered_buffer_cleanup(indio_dev); 372 373 kfree(indio_dev->channels); 373 374
+6 -1
drivers/iio/magnetometer/mag3110.c
··· 250 250 .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SAMP_FREQ) | \ 251 251 BIT(IIO_CHAN_INFO_SCALE), \ 252 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 261 static const struct iio_chan_spec mag3110_channels[] = {
+1 -2
drivers/staging/btmtk_usb/btmtk_usb.c
··· 1284 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 1289 struct btmtk_usb_data *data = hci_get_drvdata(hdev); 1291 1290 struct usb_ctrlrequest *dr; 1292 1291 struct urb *urb;
+3 -3
drivers/staging/comedi/drivers/pcl730.c
··· 173 173 if (mask) { 174 174 if (mask & 0x00ff) 175 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 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 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 181 outb((s->state >> 24) & 0xff, dev->iobase + reg + 3); 182 182 } 183 183
+1 -1
drivers/staging/comedi/drivers/s626.c
··· 494 494 * Private helper function: Write setpoint to an application DAC channel. 495 495 */ 496 496 static void s626_set_dac(struct comedi_device *dev, uint16_t chan, 497 - unsigned short dacdata) 497 + int16_t dacdata) 498 498 { 499 499 struct s626_private *devpriv = dev->private; 500 500 uint16_t signmask;
+1 -1
drivers/staging/comedi/drivers/vmk80xx.c
··· 465 465 unsigned char *rx_buf = devpriv->usb_rx_buf; 466 466 unsigned char *tx_buf = devpriv->usb_tx_buf; 467 467 int reg, cmd; 468 - int ret; 468 + int ret = 0; 469 469 470 470 if (devpriv->model == VMK8061_MODEL) { 471 471 reg = VMK8061_DO_REG;
+1 -2
drivers/staging/ft1000/ft1000-usb/ft1000_download.c
··· 578 578 u8 **c_file, const u8 *endpoint, bool boot_case) 579 579 { 580 580 long word_length; 581 - int status; 581 + int status = 0; 582 582 583 583 /*DEBUG("FT1000:REQUEST_CODE_SEGMENT\n");i*/ 584 584 word_length = get_request_value(ft1000dev); ··· 1074 1074 1075 1075 return status; 1076 1076 } 1077 -
+2
drivers/staging/iio/magnetometer/Kconfig
··· 6 6 config SENSORS_HMC5843 7 7 tristate "Honeywell HMC5843/5883/5883L 3-Axis Magnetometer" 8 8 depends on I2C 9 + select IIO_BUFFER 10 + select IIO_TRIGGERED_BUFFER 9 11 help 10 12 Say Y here to add support for the Honeywell HMC5843, HMC5883 and 11 13 HMC5883L 3-Axis Magnetometer (digital compass).
+3 -1
drivers/staging/imx-drm/Makefile
··· 8 8 obj-$(CONFIG_DRM_IMX_LDB) += imx-ldb.o 9 9 obj-$(CONFIG_DRM_IMX_FB_HELPER) += imx-fbdev.o 10 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
+1
drivers/staging/imx-drm/imx-drm-core.c
··· 72 72 { 73 73 return crtc->pipe; 74 74 } 75 + EXPORT_SYMBOL_GPL(imx_drm_crtc_id); 75 76 76 77 static void imx_drm_driver_lastclose(struct drm_device *drm) 77 78 {
+2 -2
drivers/staging/lustre/lustre/ptlrpc/pinger.c
··· 409 409 struct l_wait_info lwi = { 0 }; 410 410 int rc = 0; 411 411 412 - if (!thread_is_init(&pinger_thread) && 413 - !thread_is_stopped(&pinger_thread)) 412 + if (thread_is_init(&pinger_thread) || 413 + thread_is_stopped(&pinger_thread)) 414 414 return -EALREADY; 415 415 416 416 ptlrpc_pinger_remove_timeouts();
+15 -13
drivers/staging/media/go7007/go7007-usb.c
··· 15 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 20 #include <linux/module.h> 19 21 #include <linux/kernel.h> 20 22 #include <linux/init.h> ··· 663 661 664 662 if (usb->board->flags & GO7007_USB_EZUSB) { 665 663 /* Reset buffer in EZ-USB */ 666 - dev_dbg(go->dev, "resetting EZ-USB buffers\n"); 664 + pr_debug("resetting EZ-USB buffers\n"); 667 665 if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 || 668 666 go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0) 669 667 return -1; ··· 691 689 u16 status_reg = 0; 692 690 int timeout = 500; 693 691 694 - dev_dbg(go->dev, "WriteInterrupt: %04x %04x\n", addr, data); 692 + pr_debug("WriteInterrupt: %04x %04x\n", addr, data); 695 693 696 694 for (i = 0; i < 100; ++i) { 697 695 r = usb_control_msg(usb->usbdev, ··· 736 734 int r; 737 735 int timeout = 500; 738 736 739 - dev_dbg(go->dev, "WriteInterrupt: %04x %04x\n", addr, data); 737 + pr_debug("WriteInterrupt: %04x %04x\n", addr, data); 740 738 741 739 go->usb_buf[0] = data & 0xff; 742 740 go->usb_buf[1] = data >> 8; ··· 773 771 go->interrupt_available = 1; 774 772 go->interrupt_data = __le16_to_cpu(regs[0]); 775 773 go->interrupt_value = __le16_to_cpu(regs[1]); 776 - dev_dbg(go->dev, "ReadInterrupt: %04x %04x\n", 774 + pr_debug("ReadInterrupt: %04x %04x\n", 777 775 go->interrupt_value, go->interrupt_data); 778 776 } 779 777 ··· 893 891 int transferred, pipe; 894 892 int timeout = 500; 895 893 896 - dev_dbg(go->dev, "DownloadBuffer sending %d bytes\n", len); 894 + pr_debug("DownloadBuffer sending %d bytes\n", len); 897 895 898 896 if (usb->board->flags & GO7007_USB_EZUSB) 899 897 pipe = usb_sndbulkpipe(usb->usbdev, 2); ··· 979 977 !(msgs[i].flags & I2C_M_RD) && 980 978 (msgs[i + 1].flags & I2C_M_RD)) { 981 979 #ifdef GO7007_I2C_DEBUG 982 - dev_dbg(go->dev, "i2c write/read %d/%d bytes on %02x\n", 980 + pr_debug("i2c write/read %d/%d bytes on %02x\n", 983 981 msgs[i].len, msgs[i + 1].len, msgs[i].addr); 984 982 #endif 985 983 buf[0] = 0x01; ··· 990 988 buf[buf_len++] = msgs[++i].len; 991 989 } else if (msgs[i].flags & I2C_M_RD) { 992 990 #ifdef GO7007_I2C_DEBUG 993 - dev_dbg(go->dev, "i2c read %d bytes on %02x\n", 991 + pr_debug("i2c read %d bytes on %02x\n", 994 992 msgs[i].len, msgs[i].addr); 995 993 #endif 996 994 buf[0] = 0x01; ··· 1000 998 buf_len = 4; 1001 999 } else { 1002 1000 #ifdef GO7007_I2C_DEBUG 1003 - dev_dbg(go->dev, "i2c write %d bytes on %02x\n", 1001 + pr_debug("i2c write %d bytes on %02x\n", 1004 1002 msgs[i].len, msgs[i].addr); 1005 1003 #endif 1006 1004 buf[0] = 0x00; ··· 1059 1057 char *name; 1060 1058 int video_pipe, i, v_urb_len; 1061 1059 1062 - dev_dbg(go->dev, "probing new GO7007 USB board\n"); 1060 + pr_debug("probing new GO7007 USB board\n"); 1063 1061 1064 1062 switch (id->driver_info) { 1065 1063 case GO7007_BOARDID_MATRIX_II: ··· 1099 1097 board = &board_px_tv402u; 1100 1098 break; 1101 1099 case GO7007_BOARDID_LIFEVIEW_LR192: 1102 - dev_err(go->dev, "The Lifeview TV Walker Ultra is not supported. Sorry!\n"); 1100 + dev_err(&intf->dev, "The Lifeview TV Walker Ultra is not supported. Sorry!\n"); 1103 1101 return -ENODEV; 1104 1102 name = "Lifeview TV Walker Ultra"; 1105 1103 board = &board_lifeview_lr192; 1106 1104 break; 1107 1105 case GO7007_BOARDID_SENSORAY_2250: 1108 - dev_info(go->dev, "Sensoray 2250 found\n"); 1106 + dev_info(&intf->dev, "Sensoray 2250 found\n"); 1109 1107 name = "Sensoray 2250/2251"; 1110 1108 board = &board_sensoray_2250; 1111 1109 break; ··· 1114 1112 board = &board_ads_usbav_709; 1115 1113 break; 1116 1114 default: 1117 - dev_err(go->dev, "unknown board ID %d!\n", 1115 + dev_err(&intf->dev, "unknown board ID %d!\n", 1118 1116 (unsigned int)id->driver_info); 1119 1117 return -ENODEV; 1120 1118 } ··· 1249 1247 sizeof(go->name)); 1250 1248 break; 1251 1249 default: 1252 - dev_dbg(go->dev, "unable to detect tuner type!\n"); 1250 + pr_debug("unable to detect tuner type!\n"); 1253 1251 break; 1254 1252 } 1255 1253 /* Configure tuner mode selection inputs connected
+2 -1
drivers/staging/nvec/nvec.c
··· 681 681 dev_err(nvec->dev, 682 682 "RX buffer overflow on %p: " 683 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 686 break; 686 687 default: 687 688 nvec->state = 0;
+3
drivers/staging/rtl8188eu/core/rtw_ap.c
··· 1115 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 1121 pmlmepriv->cur_network.join_res = true;/* for check if already set beacon */ 1119 1122 return ret; 1120 1123 }
+1 -1
drivers/staging/tidspbridge/Kconfig
··· 4 4 5 5 menuconfig TIDSPBRIDGE 6 6 tristate "DSP Bridge driver" 7 - depends on ARCH_OMAP3 && !ARCH_MULTIPLATFORM 7 + depends on ARCH_OMAP3 && !ARCH_MULTIPLATFORM && BROKEN 8 8 select MAILBOX 9 9 select OMAP2PLUS_MBOX 10 10 help
+2 -1
drivers/staging/vt6655/hostap.c
··· 143 143 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", 144 144 pDevice->dev->name, pDevice->apdev->name); 145 145 } 146 - free_netdev(pDevice->apdev); 146 + if (pDevice->apdev) 147 + free_netdev(pDevice->apdev); 147 148 pDevice->apdev = NULL; 148 149 pDevice->bEnable8021x = false; 149 150 pDevice->bEnableHostWEP = false;
+11
drivers/staging/vt6656/baseband.c
··· 939 939 u8 * pbyAgc; 940 940 u16 wLengthAgc; 941 941 u8 abyArray[256]; 942 + u8 data; 942 943 943 944 ntStatus = CONTROLnsRequestIn(pDevice, 944 945 MESSAGE_TYPE_READ, ··· 1105 1104 ControlvWriteByte(pDevice,MESSAGE_REQUEST_BBREG,0x0D,0x01); 1106 1105 1107 1106 RFbRFTableDownload(pDevice); 1107 + 1108 + /* Fix for TX USB resets from vendors driver */ 1109 + CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ, USB_REG4, 1110 + MESSAGE_REQUEST_MEM, sizeof(data), &data); 1111 + 1112 + data |= 0x2; 1113 + 1114 + CONTROLnsRequestOut(pDevice, MESSAGE_TYPE_WRITE, USB_REG4, 1115 + MESSAGE_REQUEST_MEM, sizeof(data), &data); 1116 + 1108 1117 return true;//ntStatus; 1109 1118 } 1110 1119
+2 -1
drivers/staging/vt6656/hostap.c
··· 133 133 DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n", 134 134 pDevice->dev->name, pDevice->apdev->name); 135 135 } 136 - free_netdev(pDevice->apdev); 136 + if (pDevice->apdev) 137 + free_netdev(pDevice->apdev); 137 138 pDevice->apdev = NULL; 138 139 pDevice->bEnable8021x = false; 139 140 pDevice->bEnableHostWEP = false;
+2
drivers/staging/vt6656/rndis.h
··· 66 66 67 67 #define VIAUSB20_PACKET_HEADER 0x04 68 68 69 + #define USB_REG4 0x604 70 + 69 71 typedef struct _CMD_MESSAGE 70 72 { 71 73 u8 byData[256];
+14 -5
drivers/staging/zram/zram_drv.c
··· 652 652 return -ENOMEM; 653 653 654 654 /* Do not reset an active device! */ 655 - if (bdev->bd_holders) 656 - return -EBUSY; 655 + if (bdev->bd_holders) { 656 + ret = -EBUSY; 657 + goto out; 658 + } 657 659 658 660 ret = kstrtou16(buf, 10, &do_reset); 659 661 if (ret) 660 - return ret; 662 + goto out; 661 663 662 - if (!do_reset) 663 - return -EINVAL; 664 + if (!do_reset) { 665 + ret = -EINVAL; 666 + goto out; 667 + } 664 668 665 669 /* Make sure all pending I/O is finished */ 666 670 fsync_bdev(bdev); 671 + bdput(bdev); 667 672 668 673 zram_reset_device(zram, true); 669 674 return len; 675 + 676 + out: 677 + bdput(bdev); 678 + return ret; 670 679 } 671 680 672 681 static void __zram_make_request(struct zram *zram, struct bio *bio, int rw)
+13 -4
drivers/staging/zsmalloc/zsmalloc-main.c
··· 430 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 439 static void *obj_location_to_handle(struct page *page, unsigned long obj_idx) 435 440 { 436 441 unsigned long handle; ··· 446 441 } 447 442 448 443 handle = page_to_pfn(page) << OBJ_INDEX_BITS; 449 - handle |= (obj_idx & OBJ_INDEX_MASK); 444 + handle |= ((obj_idx + 1) & OBJ_INDEX_MASK); 450 445 451 446 return (void *)handle; 452 447 } 453 448 454 - /* Decode <page, obj_idx> pair from the given object handle */ 449 + /* 450 + * Decode <page, obj_idx> pair from the given object handle. We adjust the 451 + * decoded obj_idx back to its original value since it was adjusted in 452 + * obj_location_to_handle(). 453 + */ 455 454 static void obj_handle_to_location(unsigned long handle, struct page **page, 456 455 unsigned long *obj_idx) 457 456 { 458 457 *page = pfn_to_page(handle >> OBJ_INDEX_BITS); 459 - *obj_idx = handle & OBJ_INDEX_MASK; 458 + *obj_idx = (handle & OBJ_INDEX_MASK) - 1; 460 459 } 461 460 462 461 static unsigned long obj_idx_to_offset(struct page *page,
+3
include/linux/hid-sensor-hub.h
··· 21 21 22 22 #include <linux/hid.h> 23 23 #include <linux/hid-sensor-ids.h> 24 + #include <linux/iio/iio.h> 25 + #include <linux/iio/trigger.h> 24 26 25 27 /** 26 28 * struct hid_sensor_hub_attribute_info - Attribute info ··· 186 184 struct platform_device *pdev; 187 185 unsigned usage_id; 188 186 bool data_ready; 187 + struct iio_trigger *trigger; 189 188 struct hid_sensor_hub_attribute_info poll; 190 189 struct hid_sensor_hub_attribute_info report_state; 191 190 struct hid_sensor_hub_attribute_info power_state;