From: Rikard Falkeborn Date: Wed, 28 Jul 2021 09:20:52 +0000 (+0200) Subject: usb: gadget: pxa25x_udc: Constify static struct pxa25x_ep_ops X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=64cd4271ea8e6247f7ed14c443e41d0f5866aac0;p=linux.git usb: gadget: pxa25x_udc: Constify static struct pxa25x_ep_ops The struct pxa25x_ep_ops is only assigned to the ops field in the usb_ep struct, which is a pointer to const struct usb_ep_ops. Make it const to allow the compiler to put it in read-only memory. Acked-by: Felipe Balbi Signed-off-by: Rikard Falkeborn Link: https://lore.kernel.org/r/20210728092052.4178-1-rikard.falkeborn@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index 69ef1e669d0ca..a09ec1d826b21 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c @@ -1093,7 +1093,7 @@ static void pxa25x_ep_fifo_flush(struct usb_ep *_ep) } -static struct usb_ep_ops pxa25x_ep_ops = { +static const struct usb_ep_ops pxa25x_ep_ops = { .enable = pxa25x_ep_enable, .disable = pxa25x_ep_disable,