From patchwork Wed Jan 1 07:43:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 11315011 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32B06930 for ; Wed, 1 Jan 2020 08:21:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19905206E0 for ; Wed, 1 Jan 2020 08:21:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727405AbgAAIVJ (ORCPT ); Wed, 1 Jan 2020 03:21:09 -0500 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:56964 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726677AbgAAIUO (ORCPT ); Wed, 1 Jan 2020 03:20:14 -0500 X-IronPort-AV: E=Sophos;i="5.69,382,1571695200"; d="scan'208";a="429578753" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA256; 01 Jan 2020 09:20:08 +0100 From: Julia Lawall To: Cristian Birsan Cc: kernel-janitors@vger.kernel.org, Felipe Balbi , Greg Kroah-Hartman , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , linux-arm-kernel@lists.infradead.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/16] usb: gadget: udc: atmel: constify copied structure Date: Wed, 1 Jan 2020 08:43:22 +0100 Message-Id: <1577864614-5543-5-git-send-email-Julia.Lawall@inria.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> References: <1577864614-5543-1-git-send-email-Julia.Lawall@inria.fr> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The usba_gadget_template structure is only copied into another structure, so make it const. The opportunity for this change was found using Coccinelle. Signed-off-by: Julia Lawall Acked-by: Cristian Birsan --- drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index 8a42768e3213..6e0432141c40 100644 --- a/drivers/usb/gadget/udc/atmel_usba_udc.c +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c @@ -1122,7 +1122,7 @@ static struct usb_endpoint_descriptor usba_ep0_desc = { .bInterval = 1, }; -static struct usb_gadget usba_gadget_template = { +static const struct usb_gadget usba_gadget_template = { .ops = &usba_udc_ops, .max_speed = USB_SPEED_HIGH, .name = "atmel_usba_udc",