From patchwork Tue Jul 16 20:47:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 259510 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 F2D062C0169 for ; Wed, 17 Jul 2013 06:54:46 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 782E04A094; Tue, 16 Jul 2013 22:53:51 +0200 (CEST) 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 sXVc8aEZrZEE; Tue, 16 Jul 2013 22:53:51 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D6D114A09B; Tue, 16 Jul 2013 22:53:45 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 24CAC4A01F for ; Tue, 16 Jul 2013 22:53:24 +0200 (CEST) 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 B0FTyqFIggV1 for ; Tue, 16 Jul 2013 22:53:18 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=SKIP(-1.5) (only DNSBL check requested) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by theia.denx.de (Postfix) with ESMTPS id 095234A023 for ; Tue, 16 Jul 2013 22:53:16 +0200 (CEST) Received: by mail-pa0-f51.google.com with SMTP id lf11so1191212pab.10 for ; Tue, 16 Jul 2013 13:52:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=LmcIObmMtUOCuKchpjHYW9ct4TA+Ne7bx6dZGG8ridQ=; b=jXicrSC2DhtbHOkHTDFKBczv0WvEPGv0ngJZJZvc+bpxeeP2QzO2JOcMB/voNEpfQX +3hh8c4V9q62ljOG2xOSjpoTLitFUEp6E5dMt8/HV7vZYqNnPmh3lC4+Zzit5aXneQEE kdzIffb12zCvAB8+8EmeDdR8jORKi/rDQIzmxtopl1Y1jQUhE4xmBLxmehhBmuCm162g cnouGvLe6Qe3S/AWwSzupwg7eJxKy2VqYT8DAhfMw1gI0ESyHzMqaT17aLg82YSi1Nqk GM3M6xxrvsP5Tmtbr8JVZxKw0BQVbQIFsxwUqLvnCmPAZeVpLkcZyTmw4DLVhZkXj67a xzhA== X-Received: by 10.68.98.33 with SMTP id ef1mr3369817pbb.59.1374007979586; Tue, 16 Jul 2013 13:52:59 -0700 (PDT) Received: from officeserver-2 ([70.96.116.236]) by mx.google.com with ESMTPSA id wg6sm3744636pbc.3.2013.07.16.13.52.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 16 Jul 2013 13:52:59 -0700 (PDT) Received: from tkisky by officeserver-2 with local (Exim 4.80) (envelope-from ) id 1UzCA3-0000kD-Gf; Tue, 16 Jul 2013 13:47:51 -0700 From: Troy Kisky To: marek.vasut@gmail.com Date: Tue, 16 Jul 2013 13:47:42 -0700 Message-Id: <1374007666-2749-15-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1374007666-2749-1-git-send-email-troy.kisky@boundarydevices.com> References: <1374007666-2749-1-git-send-email-troy.kisky@boundarydevices.com> X-Gm-Message-State: ALoCoQlRJ3rL0tJ07Y9mdogUwxh0z7KX6BKqEhNrgzuoXRp6O7/iRUV2li3YhOKvSDqd18C9mYMR Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH RFC V1 14/18] usb: gadget: mv_udc: use static initialization of ops, udc 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 Move the initialization of gadget.ops and udc from code to the static structure. Signed-off-by: Troy Kisky --- drivers/usb/gadget/mv_udc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/mv_udc.c b/drivers/usb/gadget/mv_udc.c index 820a3b8..8f3d975 100644 --- a/drivers/usb/gadget/mv_udc.c +++ b/drivers/usb/gadget/mv_udc.c @@ -107,9 +107,11 @@ static struct usb_ep_ops mv_ep_ops = { static struct mv_ep ep[2 * NUM_ENDPOINTS]; static struct mv_drv controller = { + .udc = (struct mv_udc *)CONFIG_USB_REG_BASE, .gadget = { .ep0 = &ep[0].ep, .name = "mv_udc", + .ops = &mv_udc_ops, }, }; @@ -438,8 +440,6 @@ static int mvudc_probe(void) struct ept_queue_head *head; int i; - controller.gadget.ops = &mv_udc_ops; - controller.udc = (struct mv_udc *)CONFIG_USB_REG_BASE; epts = memalign(PAGE_SIZE, QH_MAXNUM * sizeof(struct ept_queue_head)); memset(epts, 0, QH_MAXNUM * sizeof(struct ept_queue_head)); for (i = 0; i < 2 * NUM_ENDPOINTS; i++) {