diff options
| author | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-01 19:41:58 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-01 19:41:58 -0500 |
| commit | 9641219825a54249d77d7aa1afa7d874a05c7f90 (patch) | |
| tree | 94dae67a8804a070e2597b931d1e3335f08389fc /drivers/usb/serial/ezusb.c | |
| parent | 72a73a69f6a79266b8b4b18f796907b73a5c01e3 (diff) | |
| parent | 94fcda1f8ab5e0cacc381c5ca1cc9aa6ad523576 (diff) | |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (103 commits)
usbcore: remove unused argument in autosuspend
USB: keep count of unsuspended children
USB hub: simplify remote-wakeup handling
USB: struct usb_device: change flag to bitflag
OHCI: make autostop conditional on CONFIG_PM
USB: Add autosuspend support to the hub driver
EHCI: Fix root-hub and port suspend/resume problems
USB: create a new thread for every USB device found during the probe sequence
USB: add driver for the USB debug devices
USB: added dynamic major number for USB endpoints
USB: pegasus error path not resetting task's state
USB: endianness fix for asix.c
USB: build the appledisplay driver
USB serial: replace kmalloc+memset with kzalloc
USB: hid-core: canonical defines for Apple USB device IDs
USB: idmouse cleanup
USB: make drivers/usb/core/driver.c:usb_device_match() static
USB: lh7a40x_udc remove double declaration
USB: pxa2xx_udc recognizes ixp425 rev b0 chip
usbtouchscreen: add support for DMC TSC-10/25 devices
...
Diffstat (limited to 'drivers/usb/serial/ezusb.c')
| -rw-r--r-- | drivers/usb/serial/ezusb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c index 5169c2d154ab..97ee718b1da2 100644 --- a/drivers/usb/serial/ezusb.c +++ b/drivers/usb/serial/ezusb.c | |||
| @@ -31,12 +31,11 @@ int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *da | |||
| 31 | return -ENODEV; | 31 | return -ENODEV; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | transfer_buffer = kmalloc (length, GFP_KERNEL); | 34 | transfer_buffer = kmemdup(data, length, GFP_KERNEL); |
| 35 | if (!transfer_buffer) { | 35 | if (!transfer_buffer) { |
| 36 | dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length); | 36 | dev_err(&serial->dev->dev, "%s - kmalloc(%d) failed.\n", __FUNCTION__, length); |
| 37 | return -ENOMEM; | 37 | return -ENOMEM; |
| 38 | } | 38 | } |
| 39 | memcpy (transfer_buffer, data, length); | ||
| 40 | result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 3000); | 39 | result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 3000); |
| 41 | kfree (transfer_buffer); | 40 | kfree (transfer_buffer); |
| 42 | return result; | 41 | return result; |
