diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:26:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 00:26:12 -0400 |
commit | 7a9b149212f3716c598afe973b6261fd58453b7a (patch) | |
tree | 477716d84c71da124448b72278e98da28aadbd3d /drivers/input/misc/powermate.c | |
parent | 3d62e3fdce8ef265a3706c52ae1ca6ab84e30f0e (diff) | |
parent | e26bcf37234c67624f62d9fc95f922b8dbda1363 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits)
USB: remove unused usb_buffer_alloc and usb_buffer_free macros
usb: musb: update gfp/slab.h includes
USB: ftdi_sio: fix legacy SIO-device header
USB: kl5usb105: reimplement using generic framework
USB: kl5usb105: minor clean ups
USB: kl5usb105: fix memory leak
USB: io_ti: use kfifo to implement write buffering
USB: io_ti: remove unsused private counter
USB: ti_usb: use kfifo to implement write buffering
USB: ir-usb: fix incorrect write-buffer length
USB: aircable: fix incorrect write-buffer length
USB: safe_serial: straighten out read processing
USB: safe_serial: reimplement read using generic framework
USB: safe_serial: reimplement write using generic framework
usb-storage: always print quirks
USB: usb-storage: trivial debug improvements
USB: oti6858: use port write fifo
USB: oti6858: use kfifo to implement write buffering
USB: cypress_m8: use kfifo to implement write buffering
USB: cypress_m8: remove unused drain define
...
Fix up conflicts (due to usb_buffer_alloc/free renaming) in
drivers/input/tablet/acecad.c
drivers/input/tablet/kbtab.c
drivers/input/tablet/wacom_sys.c
drivers/media/video/gspca/gspca.c
sound/usb/usbaudio.c
Diffstat (limited to 'drivers/input/misc/powermate.c')
-rw-r--r-- | drivers/input/misc/powermate.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/input/misc/powermate.c b/drivers/input/misc/powermate.c index 668913d12044..bf170f6b4422 100644 --- a/drivers/input/misc/powermate.c +++ b/drivers/input/misc/powermate.c | |||
@@ -64,7 +64,6 @@ struct powermate_device { | |||
64 | dma_addr_t data_dma; | 64 | dma_addr_t data_dma; |
65 | struct urb *irq, *config; | 65 | struct urb *irq, *config; |
66 | struct usb_ctrlrequest *configcr; | 66 | struct usb_ctrlrequest *configcr; |
67 | dma_addr_t configcr_dma; | ||
68 | struct usb_device *udev; | 67 | struct usb_device *udev; |
69 | struct input_dev *input; | 68 | struct input_dev *input; |
70 | spinlock_t lock; | 69 | spinlock_t lock; |
@@ -182,8 +181,6 @@ static void powermate_sync_state(struct powermate_device *pm) | |||
182 | usb_fill_control_urb(pm->config, pm->udev, usb_sndctrlpipe(pm->udev, 0), | 181 | usb_fill_control_urb(pm->config, pm->udev, usb_sndctrlpipe(pm->udev, 0), |
183 | (void *) pm->configcr, NULL, 0, | 182 | (void *) pm->configcr, NULL, 0, |
184 | powermate_config_complete, pm); | 183 | powermate_config_complete, pm); |
185 | pm->config->setup_dma = pm->configcr_dma; | ||
186 | pm->config->transfer_flags |= URB_NO_SETUP_DMA_MAP; | ||
187 | 184 | ||
188 | if (usb_submit_urb(pm->config, GFP_ATOMIC)) | 185 | if (usb_submit_urb(pm->config, GFP_ATOMIC)) |
189 | printk(KERN_ERR "powermate: usb_submit_urb(config) failed"); | 186 | printk(KERN_ERR "powermate: usb_submit_urb(config) failed"); |
@@ -276,13 +273,12 @@ static int powermate_input_event(struct input_dev *dev, unsigned int type, unsig | |||
276 | 273 | ||
277 | static int powermate_alloc_buffers(struct usb_device *udev, struct powermate_device *pm) | 274 | static int powermate_alloc_buffers(struct usb_device *udev, struct powermate_device *pm) |
278 | { | 275 | { |
279 | pm->data = usb_buffer_alloc(udev, POWERMATE_PAYLOAD_SIZE_MAX, | 276 | pm->data = usb_alloc_coherent(udev, POWERMATE_PAYLOAD_SIZE_MAX, |
280 | GFP_ATOMIC, &pm->data_dma); | 277 | GFP_ATOMIC, &pm->data_dma); |
281 | if (!pm->data) | 278 | if (!pm->data) |
282 | return -1; | 279 | return -1; |
283 | 280 | ||
284 | pm->configcr = usb_buffer_alloc(udev, sizeof(*(pm->configcr)), | 281 | pm->configcr = kmalloc(sizeof(*(pm->configcr)), GFP_KERNEL); |
285 | GFP_ATOMIC, &pm->configcr_dma); | ||
286 | if (!pm->configcr) | 282 | if (!pm->configcr) |
287 | return -1; | 283 | return -1; |
288 | 284 | ||
@@ -291,10 +287,9 @@ static int powermate_alloc_buffers(struct usb_device *udev, struct powermate_dev | |||
291 | 287 | ||
292 | static void powermate_free_buffers(struct usb_device *udev, struct powermate_device *pm) | 288 | static void powermate_free_buffers(struct usb_device *udev, struct powermate_device *pm) |
293 | { | 289 | { |
294 | usb_buffer_free(udev, POWERMATE_PAYLOAD_SIZE_MAX, | 290 | usb_free_coherent(udev, POWERMATE_PAYLOAD_SIZE_MAX, |
295 | pm->data, pm->data_dma); | 291 | pm->data, pm->data_dma); |
296 | usb_buffer_free(udev, sizeof(*(pm->configcr)), | 292 | kfree(pm->configcr); |
297 | pm->configcr, pm->configcr_dma); | ||
298 | } | 293 | } |
299 | 294 | ||
300 | /* Called whenever a USB device matching one in our supported devices table is connected */ | 295 | /* Called whenever a USB device matching one in our supported devices table is connected */ |