sound: line6: move to use usb_control_msg_send() and usb_control_msg_recv()
[sfrench/cifs-2.6.git] / sound / usb / line6 / toneport.c
index 94dd5e7ab2e682d5babae66fa9cb47e50ad8dd81..4e5693c97aa42165c40014f3b703aa084f8c3c95 100644 (file)
@@ -126,11 +126,12 @@ static int toneport_send_cmd(struct usb_device *usbdev, int cmd1, int cmd2)
 {
        int ret;
 
-       ret = usb_control_msg(usbdev, usb_sndctrlpipe(usbdev, 0), 0x67,
-                             USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
-                             cmd1, cmd2, NULL, 0, LINE6_TIMEOUT * HZ);
+       ret = usb_control_msg_send(usbdev, 0, 0x67,
+                                  USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
+                                  cmd1, cmd2, NULL, 0, LINE6_TIMEOUT * HZ,
+                                  GFP_KERNEL);
 
-       if (ret < 0) {
+       if (ret) {
                dev_err(&usbdev->dev, "send failed (error %d)\n", ret);
                return ret;
        }