[PATCH 2/2] fixup! input: port usb keyboard driver from the u-boot
Sascha Hauer
s.hauer at pengutronix.de
Wed Sep 23 07:34:55 PDT 2015
No need for coherent memory in the keyboard driver. The USB driver should
handle the cache handling.
---
drivers/input/usb_kbd.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/input/usb_kbd.c b/drivers/input/usb_kbd.c
index 3d70c8d..8c08aba 100644
--- a/drivers/input/usb_kbd.c
+++ b/drivers/input/usb_kbd.c
@@ -347,7 +347,7 @@ static int usb_kbd_probe(struct usb_device *usbdev,
data = xzalloc(sizeof(struct usb_kbd_pdata));
usbdev->drv_data = data;
data->recv_fifo = kfifo_alloc(USB_KBD_FIFO_SIZE);
- data->new = dma_alloc_coherent(USB_KBD_BOOT_REPORT_SIZE, NULL);
+ data->new = dma_alloc(USB_KBD_BOOT_REPORT_SIZE);
data->usbdev = usbdev;
data->last_report = get_time_ns();
@@ -369,8 +369,7 @@ static int usb_kbd_probe(struct usb_device *usbdev,
if (ret < 0) {
/* no luck */
kfifo_free(data->recv_fifo);
- dma_free_coherent(data->new, 0,
- USB_KBD_BOOT_REPORT_SIZE);
+ dma_free(data->new);
free(data);
return ret;
} else
@@ -398,7 +397,7 @@ static void usb_kbd_disconnect(struct usb_device *usbdev)
poller_unregister(&data->poller);
console_unregister(&data->cdev);
kfifo_free(data->recv_fifo);
- dma_free_coherent(data->new, 0, USB_KBD_BOOT_REPORT_SIZE);
+ dma_free(data->new);
free(data);
}
--
2.5.1
More information about the barebox
mailing list