瀏覽代碼

USB: powermate: Use usb_endpoint_* functions.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Luiz Fernando N. Capitulino 18 年之前
父節點
當前提交
60ca126c95
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      drivers/usb/input/powermate.c

+ 1 - 3
drivers/usb/input/powermate.c

@@ -313,9 +313,7 @@ static int powermate_probe(struct usb_interface *intf, const struct usb_device_i
 
 	interface = intf->cur_altsetting;
 	endpoint = &interface->endpoint[0].desc;
-	if (!(endpoint->bEndpointAddress & 0x80))
-		return -EIO;
-	if ((endpoint->bmAttributes & 3) != 3)
+	if (!usb_endpoint_is_int_in(endpoint))
 		return -EIO;
 
 	usb_control_msg(udev, usb_sndctrlpipe(udev, 0),