Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1711840
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Input: ati_remote2: constify usb_device_id |
| Date | 2017-08-15 07:20 +0200 |
| Message-ID | <ueCqK-5xr-11@gated-at.bofh.it> (permalink) |
| References | <ucg1j-2Fc-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] Input: ati_remote2: constify usb_device_id Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-08-15 07:20 +0200
csiph-web