From patchwork Tue Feb 14 04:58:18 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 141044 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 40B8AB6FB7 for ; Tue, 14 Feb 2012 15:58:52 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A37E928085; Tue, 14 Feb 2012 05:58:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IT5WKxCmkhMS; Tue, 14 Feb 2012 05:58:45 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 26E5428086; Tue, 14 Feb 2012 05:58:37 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5778828081 for ; Tue, 14 Feb 2012 05:58:34 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KQW-d20a8K5Y for ; Tue, 14 Feb 2012 05:58:32 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ey0-f172.google.com (mail-ey0-f172.google.com [209.85.215.172]) by theia.denx.de (Postfix) with ESMTPS id 7D03B2807B for ; Tue, 14 Feb 2012 05:58:32 +0100 (CET) Received: by mail-ey0-f172.google.com with SMTP id l12so3174791eaa.3 for ; Mon, 13 Feb 2012 20:58:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=SU6oxL0AB56yct6uAMEp/3aRPS1tuY2ojrhHeNhkVAs=; b=ceI0lJVEDNgQgP3jOZhKouh9fuGaDJdNKxYB+qC06GQwE07SgjRg6e4rVlne0uopGv bDvUclA2cEIWkgYtXrjgnrLN+ALzUkGdN4NhxBWcOddxSgtsxgoWk46eIZKhZ0+aXKhe yTl0ruggYp17r8MzFXCSoWw7jhgAQWraT7G8g= Received: by 10.213.16.142 with SMTP id o14mr145711eba.144.1329195512356; Mon, 13 Feb 2012 20:58:32 -0800 (PST) Received: from mashiro.kolej.mff.cuni.cz (vasut.kolej.mff.cuni.cz. [78.128.198.52]) by mx.google.com with ESMTPS id o49sm69014354eei.0.2012.02.13.20.58.31 (version=SSLv3 cipher=OTHER); Mon, 13 Feb 2012 20:58:32 -0800 (PST) From: Marek Vasut To: u-boot@lists.denx.de Date: Tue, 14 Feb 2012 05:58:18 +0100 Message-Id: <1329195499-20414-4-git-send-email-marek.vasut@gmail.com> X-Mailer: git-send-email 1.7.8.3 In-Reply-To: <1329195499-20414-1-git-send-email-marek.vasut@gmail.com> References: <1329195499-20414-1-git-send-email-marek.vasut@gmail.com> Subject: [U-Boot] [PATCH 3/4] USB: Make struct devrequest setup_packet local X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Marek Vasut Cc: Remy Bohmer Acked-by: Mike Frysinger --- common/usb.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/common/usb.c b/common/usb.c index 81dcbe2..3c9ede4 100644 --- a/common/usb.c +++ b/common/usb.c @@ -73,7 +73,6 @@ static struct usb_device usb_dev[USB_MAX_DEVICE]; static int dev_index; static int running; static int asynch_allowed; -static struct devrequest setup_packet; char usb_started; /* flag for the started/stopped USB status */ @@ -180,6 +179,8 @@ int usb_control_msg(struct usb_device *dev, unsigned int pipe, unsigned short value, unsigned short index, void *data, unsigned short size, int timeout) { + struct devrequest setup_packet; + if ((timeout == 0) && (!asynch_allowed)) { /* request for a asynch control pipe is not allowed */ return -1;