summaryrefslogtreecommitdiffstats
path: root/drivers/power/charger-manager.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2013-02-18 11:15:55 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-18 10:53:50 -0800
commit951348b377385475aa256c27e1c9e2564c9ec160 (patch)
treecc6d70195338393e4362e24da879e2ac7b9421a5 /drivers/power/charger-manager.c
parent6b07b30892ad972286871787079ed68d07779ba4 (diff)
downloadop-kernel-dev-951348b377385475aa256c27e1c9e2564c9ec160.zip
op-kernel-dev-951348b377385475aa256c27e1c9e2564c9ec160.tar.gz
staging: comedi: vmk80xx: wait for URBs to complete
For Velleman K8055 (aka VM110), `vmk80xx_read_packet()` and `vmk8055_write_packet()` send an URB asynchronously and do not wait for it complete. However, callers of `vmk80xx_read_packet()` are assuming the contents of the data buffer `devpriv->usb_rx_buf` are valid immediately after that function returns. For Velleman K8061 (aka VM140), `vmk80xx_read_packet()` and `vmk80xx_write_packet()` punt the requests to `vmk80xx_do_bulk_msg()` which *does* wait for the URBs to complete (albeit with no error checking!). Change `vmk80xx_read_packet()` and `vmk80xx_write_packet()` to use `usb_interrupt_msg()` for the K8055, so the callers of `vmk80xx_read_packet()` can assume the data buffer contents are valid (if no error occurred). Remove all the code for checking for transfers in progress and busy waiting, as it's no longer needed. Pretty much all the callers of `vmk80xx_read_packet()` and `vmk80xx_write_packet()` hold the same semaphore anyway, and the only caller that doesn't (`vmk80xx_reset_device()` called during initialization of the device) doesn't really matter. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/power/charger-manager.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud