linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jeffery <andrew@aj.id.au>
To: Julia Lawall <Julia.Lawall@lip6.fr>, Felipe Balbi <balbi@kernel.org>
Cc: kernel-janitors@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Joel Stanley <joel@jms.id.au>,
	linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: usb: gadget: aspeed-vhub: constify usb_gadget_ops structure
Date: Thu, 08 Nov 2018 11:05:16 +1030	[thread overview]
Message-ID: <1541637316.1471870.1569457840.5A56DC54@webmail.messagingengine.com> (raw)

On Wed, 31 Oct 2018, at 02:49, Julia Lawall wrote:
> The usb_gadget_ops structure can be const as it is only stored in
> the ops field of a usb_gadget structure and this field is const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Reviewed-by: Andrew Jeffery <andrew@aj.id.au>

> 
> ---
>  drivers/usb/gadget/udc/aspeed-vhub/dev.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/aspeed-vhub/dev.c b/drivers/usb/
> gadget/udc/aspeed-vhub/dev.c
> index f0233912bace..6b1b16b17d7d 100644
> --- a/drivers/usb/gadget/udc/aspeed-vhub/dev.c
> +++ b/drivers/usb/gadget/udc/aspeed-vhub/dev.c
> @@ -438,7 +438,7 @@ static int ast_vhub_udc_stop(struct usb_gadget 
> *gadget)
>  	return 0;
>  }
>  
> -static struct usb_gadget_ops ast_vhub_udc_ops = {
> +static const struct usb_gadget_ops ast_vhub_udc_ops = {
>  	.get_frame	= ast_vhub_udc_get_frame,
>  	.wakeup		= ast_vhub_udc_wakeup,
>  	.pullup		= ast_vhub_udc_pullup,
>

             reply	other threads:[~2018-11-08  0:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-08  0:35 Andrew Jeffery [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-10-30 16:19 usb: gadget: aspeed-vhub: constify usb_gadget_ops structure Julia Lawall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1541637316.1471870.1569457840.5A56DC54@webmail.messagingengine.com \
    --to=andrew@aj.id.au \
    --cc=Julia.Lawall@lip6.fr \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joel@jms.id.au \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).