From patchwork Tue Oct 30 16:19:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10661309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F0E6A13A4 for ; Tue, 30 Oct 2018 16:55:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF0AD284A7 for ; Tue, 30 Oct 2018 16:55:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E35F42A90F; Tue, 30 Oct 2018 16:55:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9FA72284A7 for ; Tue, 30 Oct 2018 16:55:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=s+rPjZfooMVgAJ5WpGFvDQjIxYn+VTcxb2FEppVuKj8=; b=SeR nome4U81qoBymecharwbauxqFkZTn+dlB8jK7JtiLfSonTPJLnoaVWFvS6P4u0igp/A1XBo0+Fa1A wJnvqYhVIgWtVNPnc+V5v3EyTikh/0YuoxW6ATyVUv6MJheh+PjXySf8drmpF8Ni4ORH3I0eVwthj 9mgrYQW1KDujTzIgjh3s5uXo1oH8YwKBh7qX5K1+ROvZ6BORFYg+4ef0wXbaqPu5diKBKuR0GWJAp L2IC5EOw7BPIiBdHQn9YPLDvjMsIrvCL3zUKucaR945sIwBt0RodsjHeD5TTFgdbLBjK8tlLVwZq0 QEVBrmKsk3nfQEd6Cdm+Hwd0AqsREEw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHXIk-00058G-Ah; Tue, 30 Oct 2018 16:55:34 +0000 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHXIf-000500-5c for linux-arm-kernel@lists.infradead.org; Tue, 30 Oct 2018 16:55:32 +0000 X-IronPort-AV: E=Sophos;i="5.54,445,1534802400"; d="scan'208";a="353504948" Received: from palace.lip6.fr ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 30 Oct 2018 17:55:17 +0100 From: Julia Lawall To: Felipe Balbi Subject: [PATCH] usb: gadget: aspeed-vhub: constify usb_gadget_ops structure Date: Tue, 30 Oct 2018 17:19:59 +0100 Message-Id: <1540916399-22426-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181030_095529_478204_2DA9E513 X-CRM114-Status: GOOD ( 10.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-aspeed@lists.ozlabs.org, Andrew Jeffery , Greg Kroah-Hartman , linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Joel Stanley , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The usb_gadget_ops structure can be const as it is only stored in the ops field of a usb_gadget structure and this field is const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Andrew Jeffery --- drivers/usb/gadget/udc/aspeed-vhub/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/aspeed-vhub/dev.c b/drivers/usb/gadget/udc/aspeed-vhub/dev.c index f0233912bace..6b1b16b17d7d 100644 --- a/drivers/usb/gadget/udc/aspeed-vhub/dev.c +++ b/drivers/usb/gadget/udc/aspeed-vhub/dev.c @@ -438,7 +438,7 @@ static int ast_vhub_udc_stop(struct usb_gadget *gadget) return 0; } -static struct usb_gadget_ops ast_vhub_udc_ops = { +static const struct usb_gadget_ops ast_vhub_udc_ops = { .get_frame = ast_vhub_udc_get_frame, .wakeup = ast_vhub_udc_wakeup, .pullup = ast_vhub_udc_pullup,