Skip to content

Commit

Permalink
usb: gadget: udc: atmel: constify copied structure
Browse files Browse the repository at this point in the history
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 <Julia.Lawall@inria.fr>
Acked-by: Cristian Birsan <cristian.birsan@microchip.com>
Link: https://lore.kernel.org/r/1577864614-5543-5-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Julia Lawall authored and Greg Kroah-Hartman committed Jan 8, 2020
1 parent 17da9b8 commit 0e84f2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/udc/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0e84f2f

Please sign in to comment.