Skip to content

Commit

Permalink
usb: gadget: pxa25x_udc: Constify static struct pxa25x_ep_ops
Browse files Browse the repository at this point in the history
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 <balbi@kernel.org>
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210728092052.4178-1-rikard.falkeborn@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Rikard Falkeborn authored and Greg Kroah-Hartman committed Jul 29, 2021
1 parent 0132bf6 commit 64cd427
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/udc/pxa25x_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down

0 comments on commit 64cd427

Please sign in to comment.