From: Andrew Jeffery <andrew@aj.id.au>
To: linux-aspeed@lists.ozlabs.org
Subject: [PATCH] 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)
In-Reply-To: <1540916399-22426-1-git-send-email-Julia.Lawall@lip6.fr>
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,
>
prev parent reply other threads:[~2018-11-08 0:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 16:19 [PATCH] usb: gadget: aspeed-vhub: constify usb_gadget_ops structure Julia Lawall
2018-11-08 0:35 ` Andrew Jeffery [this message]
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=linux-aspeed@lists.ozlabs.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).