From patchwork Mon Mar 21 19:58:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrice Chotard X-Patchwork-Id: 648811 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2LJx5in031201 for ; Mon, 21 Mar 2011 19:59:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754309Ab1CUT7A (ORCPT ); Mon, 21 Mar 2011 15:59:00 -0400 Received: from smtp21.services.sfr.fr ([93.17.128.3]:18032 "EHLO smtp21.services.sfr.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754315Ab1CUT67 (ORCPT ); Mon, 21 Mar 2011 15:58:59 -0400 Received: from filter.sfr.fr (localhost [127.0.0.1]) by msfrf2111.sfr.fr (SMTP Server) with ESMTP id ED7D0700008C; Mon, 21 Mar 2011 20:58:57 +0100 (CET) Received: from [192.168.1.59] (unknown [78.116.79.241]) by msfrf2111.sfr.fr (SMTP Server) with ESMTP id 082BA7000099; Mon, 21 Mar 2011 20:58:56 +0100 (CET) X-SFR-UUID: 20110321195857335.082BA7000099@msfrf2111.sfr.fr Message-ID: <4D87AE00.8090403@sfr.fr> Date: Mon, 21 Mar 2011 20:58:56 +0100 From: Patrice Chotard User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: linux-media@vger.kernel.org CC: linux-kernel@vger.kernel.org, Jean-Francois Moine , Theodore Kilgore Subject: [PATCH] add endpoint direction test in alt_xfer Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 21 Mar 2011 19:59:05 +0000 (UTC) diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index f21f2a2..03823ea 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -631,7 +631,8 @@ static struct usb_host_endpoint *alt_xfer(struct usb_host_interface *alt, ep = &alt->endpoint[i]; attr = ep->desc.bmAttributes & USB_ENDPOINT_XFERTYPE_MASK; if (attr == xfer - && ep->desc.wMaxPacketSize != 0) + && ep->desc.wMaxPacketSize != 0 + && usb_endpoint_dir_in(&ep->desc)) return ep; } return NULL;