[PATCH] usb: gadget: ci: Make various ops const

Marek Vasut marex at denx.de
Mon Mar 7 03:10:51 CET 2022


On 3/4/22 23:59, Adam Ford wrote:
> ci_udc_ops and ci_ep_ops do not change their operations.
> Mark them as const.
> 
> Signed-off-by: Adam Ford <aford173 at gmail.com>
> 
> diff --git a/drivers/usb/gadget/ci_udc.c b/drivers/usb/gadget/ci_udc.c
> index 542684c1c3..d9a89a17b2 100644
> --- a/drivers/usb/gadget/ci_udc.c
> +++ b/drivers/usb/gadget/ci_udc.c
> @@ -94,11 +94,11 @@ static struct usb_request *
>   ci_ep_alloc_request(struct usb_ep *ep, unsigned int gfp_flags);
>   static void ci_ep_free_request(struct usb_ep *ep, struct usb_request *_req);
>   
> -static struct usb_gadget_ops ci_udc_ops = {
> +static const struct usb_gadget_ops ci_udc_ops = {
>   	.pullup = ci_pullup,
>   };
>   
> -static struct usb_ep_ops ci_ep_ops = {
> +static const struct usb_ep_ops ci_ep_ops = {
>   	.enable         = ci_ep_enable,
>   	.disable        = ci_ep_disable,
>   	.queue          = ci_ep_queue,

Applied, thanks.


More information about the U-Boot mailing list