Skip to content

Commit 537adba

Browse files
committed
fbdev: udlfb: Use usb_control_msg_send()
Use the newly introduced usb_control_msg_send() instead of usb_control_msg() when selecting the channel. Reviewed-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent ed9de4e commit 537adba

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

drivers/video/fbdev/udlfb.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,24 +1543,16 @@ static const struct device_attribute fb_device_attrs[] = {
15431543
static int dlfb_select_std_channel(struct dlfb_data *dlfb)
15441544
{
15451545
int ret;
1546-
void *buf;
15471546
static const u8 set_def_chn[] = {
15481547
0x57, 0xCD, 0xDC, 0xA7,
15491548
0x1C, 0x88, 0x5E, 0x15,
15501549
0x60, 0xFE, 0xC6, 0x97,
15511550
0x16, 0x3D, 0x47, 0xF2 };
15521551

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,
15601553
(USB_DIR_OUT | USB_TYPE_VENDOR), 0, 0,
1561-
buf, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT);
1562-
1563-
kfree(buf);
1554+
&set_def_chn, sizeof(set_def_chn), USB_CTRL_SET_TIMEOUT,
1555+
GFP_KERNEL);
15641556

15651557
return ret;
15661558
}

0 commit comments

Comments
 (0)