udlfb.c (ed9de4ed39875706607fb08118a58344ae6c5f42) | udlfb.c (537adba4083ed858db4b5129ea78a820a6fb2edc) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * udlfb.c -- Framebuffer driver for DisplayLink USB controller 4 * 5 * Copyright (C) 2009 Roberto De Ioris <roberto@unbit.it> 6 * Copyright (C) 2009 Jaya Kumar <jayakumar.lkml@gmail.com> 7 * Copyright (C) 2009 Bernie Thompson <bernie@plugable.com> 8 * --- 1529 unchanged lines hidden (view full) --- 1538}; 1539 1540/* 1541 * This is necessary before we can communicate with the display controller. 1542 */ 1543static int dlfb_select_std_channel(struct dlfb_data *dlfb) 1544{ 1545 int ret; | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * udlfb.c -- Framebuffer driver for DisplayLink USB controller 4 * 5 * Copyright (C) 2009 Roberto De Ioris <roberto@unbit.it> 6 * Copyright (C) 2009 Jaya Kumar <jayakumar.lkml@gmail.com> 7 * Copyright (C) 2009 Bernie Thompson <bernie@plugable.com> 8 * --- 1529 unchanged lines hidden (view full) --- 1538}; 1539 1540/* 1541 * This is necessary before we can communicate with the display controller. 1542 */ 1543static int dlfb_select_std_channel(struct dlfb_data *dlfb) 1544{ 1545 int ret; |
1546 void *buf; | |
1547 static const u8 set_def_chn[] = { 1548 0x57, 0xCD, 0xDC, 0xA7, 1549 0x1C, 0x88, 0x5E, 0x15, 1550 0x60, 0xFE, 0xC6, 0x97, 1551 0x16, 0x3D, 0x47, 0xF2 }; 1552 | 1546 static const u8 set_def_chn[] = { 1547 0x57, 0xCD, 0xDC, 0xA7, 1548 0x1C, 0x88, 0x5E, 0x15, 1549 0x60, 0xFE, 0xC6, 0x97, 1550 0x16, 0x3D, 0x47, 0xF2 }; 1551 |
1553 buf = kmemdup(set_def_chn, sizeof(set_def_chn), GFP_KERNEL); 1554 1555 if (!buf) 1556 return -ENOMEM; 1557 1558 ret = usb_control_msg(dlfb->udev, usb_sndctrlpipe(dlfb->udev, 0), 1559 NR_USB_REQUEST_CHANNEL, | 1552 ret = usb_control_msg_send(dlfb->udev, 0, NR_USB_REQUEST_CHANNEL, |
1560 (USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0, | 1553 (USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0, |
1561 buf, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT); | 1554 &set_def_chn, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT, 1555 GFP_KERNEL); |
1562 | 1556 |
1563 kfree(buf); 1564 | |
1565 return ret; 1566} 1567 1568static int dlfb_parse_vendor_descriptor(struct dlfb_data *dlfb, 1569 struct usb_interface *intf) 1570{ 1571 char *desc; 1572 char *buf; --- 437 unchanged lines hidden --- | 1557 return ret; 1558} 1559 1560static int dlfb_parse_vendor_descriptor(struct dlfb_data *dlfb, 1561 struct usb_interface *intf) 1562{ 1563 char *desc; 1564 char *buf; --- 437 unchanged lines hidden --- |