From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: syrjala@sci.fi, linux-kernel@vger.kernel.org,
linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: ati_remote2: constify usb_device_id
Date: Mon, 14 Aug 2017 22:11:17 -0700 [thread overview]
Message-ID: <20170815051117.GB40695@dtor-ws> (raw)
In-Reply-To: <8d2f77c37ab938f3b4ed124b02aff2021714e591.1502211151.git.arvind.yadav.cs@gmail.com>
On Tue, Aug 08, 2017 at 10:24:12PM +0530, Arvind Yadav wrote:
> usb_device_id are not supposed to change at runtime. All functions
> working with usb_device_id provided by <linux/usb.h> work with
> const usb_device_id. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Applied, thank you.
> ---
> drivers/input/misc/ati_remote2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/misc/ati_remote2.c b/drivers/input/misc/ati_remote2.c
> index 1c5914c..ebf4448 100644
> --- a/drivers/input/misc/ati_remote2.c
> +++ b/drivers/input/misc/ati_remote2.c
> @@ -110,7 +110,7 @@ static const struct kernel_param_ops param_ops_mode_mask = {
> module_param(mode_mask, mode_mask, 0644);
> MODULE_PARM_DESC(mode_mask, "Bitmask of modes to accept <4:PC><3:AUX4><2:AUX3><1:AUX2><0:AUX1>");
>
> -static struct usb_device_id ati_remote2_id_table[] = {
> +static const struct usb_device_id ati_remote2_id_table[] = {
> { USB_DEVICE(0x0471, 0x0602) }, /* ATI Remote Wonder II */
> { }
> };
> --
> 2.7.4
>
--
Dmitry
prev parent reply other threads:[~2017-08-15 5:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-08 16:54 [PATCH] Input: ati_remote2: constify usb_device_id Arvind Yadav
2017-08-15 5:11 ` Dmitry Torokhov [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=20170815051117.GB40695@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syrjala@sci.fi \
/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