aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/usbkbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/usbhid/usbkbd.c')
-rw-r--r--drivers/hid/usbhid/usbkbd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
index bdc7b09e8670..bb14c8270af3 100644
--- a/drivers/hid/usbhid/usbkbd.c
+++ b/drivers/hid/usbhid/usbkbd.c
@@ -196,11 +196,11 @@ static int usb_kbd_alloc_mem(struct usb_device *dev, struct usb_kbd *kbd)
196 return -1; 196 return -1;
197 if (!(kbd->led = usb_alloc_urb(0, GFP_KERNEL))) 197 if (!(kbd->led = usb_alloc_urb(0, GFP_KERNEL)))
198 return -1; 198 return -1;
199 if (!(kbd->new = usb_buffer_alloc(dev, 8, GFP_ATOMIC, &kbd->new_dma))) 199 if (!(kbd->new = usb_alloc_coherent(dev, 8, GFP_ATOMIC, &kbd->new_dma)))
200 return -1; 200 return -1;
201 if (!(kbd->cr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL))) 201 if (!(kbd->cr = kmalloc(sizeof(struct usb_ctrlrequest), GFP_KERNEL)))
202 return -1; 202 return -1;
203 if (!(kbd->leds = usb_buffer_alloc(dev, 1, GFP_ATOMIC, &kbd->leds_dma))) 203 if (!(kbd->leds = usb_alloc_coherent(dev, 1, GFP_ATOMIC, &kbd->leds_dma)))
204 return -1; 204 return -1;
205 205
206 return 0; 206 return 0;
@@ -210,9 +210,9 @@ static void usb_kbd_free_mem(struct usb_device *dev, struct usb_kbd *kbd)
210{ 210{
211 usb_free_urb(kbd->irq); 211 usb_free_urb(kbd->irq);
212 usb_free_urb(kbd->led); 212 usb_free_urb(kbd->led);
213 usb_buffer_free(dev, 8, kbd->new, kbd->new_dma); 213 usb_free_coherent(dev, 8, kbd->new, kbd->new_dma);
214 kfree(kbd->cr); 214 kfree(kbd->cr);
215 usb_buffer_free(dev, 1, kbd->leds, kbd->leds_dma); 215 usb_free_coherent(dev, 1, kbd->leds, kbd->leds_dma);
216} 216}
217 217
218static int usb_kbd_probe(struct usb_interface *iface, 218static int usb_kbd_probe(struct usb_interface *iface,