diff options
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/usbhid/hid-core.c | 12 | ||||
-rw-r--r-- | drivers/hid/usbhid/usbkbd.c | 9 |
2 files changed, 7 insertions, 14 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c index 1c0bd481219c..d06b9e70ce6a 100644 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c | |||
@@ -626,14 +626,10 @@ static void hid_free_buffers(struct usb_device *dev, struct hid_device *hid) | |||
626 | { | 626 | { |
627 | struct usbhid_device *usbhid = hid->driver_data; | 627 | struct usbhid_device *usbhid = hid->driver_data; |
628 | 628 | ||
629 | if (usbhid->inbuf) | 629 | usb_buffer_free(dev, usbhid->bufsize, usbhid->inbuf, usbhid->inbuf_dma); |
630 | usb_buffer_free(dev, usbhid->bufsize, usbhid->inbuf, usbhid->inbuf_dma); | 630 | usb_buffer_free(dev, usbhid->bufsize, usbhid->outbuf, usbhid->outbuf_dma); |
631 | if (usbhid->outbuf) | 631 | usb_buffer_free(dev, sizeof(*(usbhid->cr)), usbhid->cr, usbhid->cr_dma); |
632 | usb_buffer_free(dev, usbhid->bufsize, usbhid->outbuf, usbhid->outbuf_dma); | 632 | usb_buffer_free(dev, usbhid->bufsize, usbhid->ctrlbuf, usbhid->ctrlbuf_dma); |
633 | if (usbhid->cr) | ||
634 | usb_buffer_free(dev, sizeof(*(usbhid->cr)), usbhid->cr, usbhid->cr_dma); | ||
635 | if (usbhid->ctrlbuf) | ||
636 | usb_buffer_free(dev, usbhid->bufsize, usbhid->ctrlbuf, usbhid->ctrlbuf_dma); | ||
637 | } | 633 | } |
638 | 634 | ||
639 | /* | 635 | /* |
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c index 65aa12e8d7b3..36ddc7a7a427 100644 --- a/drivers/hid/usbhid/usbkbd.c +++ b/drivers/hid/usbhid/usbkbd.c | |||
@@ -211,12 +211,9 @@ static void usb_kbd_free_mem(struct usb_device *dev, struct usb_kbd *kbd) | |||
211 | { | 211 | { |
212 | usb_free_urb(kbd->irq); | 212 | usb_free_urb(kbd->irq); |
213 | usb_free_urb(kbd->led); | 213 | usb_free_urb(kbd->led); |
214 | if (kbd->new) | 214 | usb_buffer_free(dev, 8, kbd->new, kbd->new_dma); |
215 | usb_buffer_free(dev, 8, kbd->new, kbd->new_dma); | 215 | usb_buffer_free(dev, sizeof(struct usb_ctrlrequest), kbd->cr, kbd->cr_dma); |
216 | if (kbd->cr) | 216 | usb_buffer_free(dev, 1, kbd->leds, kbd->leds_dma); |
217 | usb_buffer_free(dev, sizeof(struct usb_ctrlrequest), kbd->cr, kbd->cr_dma); | ||
218 | if (kbd->leds) | ||
219 | usb_buffer_free(dev, 1, kbd->leds, kbd->leds_dma); | ||
220 | } | 217 | } |
221 | 218 | ||
222 | static int usb_kbd_probe(struct usb_interface *iface, | 219 | static int usb_kbd_probe(struct usb_interface *iface, |