linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: dmitry.torokhov@gmail.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 6/8] Input: synaptics_usb: constify usb_device_id.
Date: Sun,  6 Aug 2017 13:11:25 +0530	[thread overview]
Message-ID: <1502005287-17705-7-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1502005287-17705-1-git-send-email-arvind.yadav.cs@gmail.com>

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>
---
 drivers/input/mouse/synaptics_usb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/mouse/synaptics_usb.c b/drivers/input/mouse/synaptics_usb.c
index 6bcc018..cb7d15d 100644
--- a/drivers/input/mouse/synaptics_usb.c
+++ b/drivers/input/mouse/synaptics_usb.c
@@ -525,7 +525,7 @@ static int synusb_reset_resume(struct usb_interface *intf)
 	return synusb_resume(intf);
 }
 
-static struct usb_device_id synusb_idtable[] = {
+static const struct usb_device_id synusb_idtable[] = {
 	{ USB_DEVICE_SYNAPTICS(TP, SYNUSB_TOUCHPAD) },
 	{ USB_DEVICE_SYNAPTICS(INT_TP, SYNUSB_TOUCHPAD) },
 	{ USB_DEVICE_SYNAPTICS(CPAD,
-- 
2.7.4

  parent reply	other threads:[~2017-08-06  7:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-06  7:41 [PATCH 0/8] constify input usb_device_id Arvind Yadav
2017-08-06  7:41 ` [PATCH 1/8] Input: iforce: constify usb_device_id and fix space before '[' error: Arvind Yadav
2017-08-06  7:41 ` [PATCH 2/8] Input: xpad: constify usb_device_id Arvind Yadav
2017-08-06  7:41 ` [PATCH 3/8] Input: keyspan_remote: " Arvind Yadav
2017-08-06  7:41 ` [PATCH 4/8] Input: powermate: constify usb_device_id and fix space before '[' error Arvind Yadav
2017-08-06  7:41 ` [PATCH 5/8] Input: appletouch: constify usb_device_id Arvind Yadav
2017-08-06  7:41 ` Arvind Yadav [this message]
2017-08-06  7:41 ` [PATCH 7/8] Input: acecad: constify usb_device_idi and fix space before '[' error Arvind Yadav
2017-08-06  7:41 ` [PATCH 8/8] Input: kbtab: constify usb_device_id Arvind Yadav
2017-08-08  3:05 ` [PATCH 0/8] constify input usb_device_id Dmitry Torokhov

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=1502005287-17705-7-git-send-email-arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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).