linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: jikos@kernel.org, benjamin.tissoires@redhat.com
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	dmlambea@gmail.com, alexhenrie24@gmail.com,
	Rikard Falkeborn <rikard.falkeborn@gmail.com>
Subject: [PATCH 1/2] HID: cougar: Constify cougar_id_table
Date: Mon, 27 Jul 2020 15:21:59 +0200	[thread overview]
Message-ID: <20200727132200.32510-2-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <20200727132200.32510-1-rikard.falkeborn@gmail.com>

cougar_id_table[] is not changed and can be made const to allow the
compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
 drivers/hid/hid-cougar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-cougar.c b/drivers/hid/hid-cougar.c
index 4ff3bc1d25e2..28d671c5e0ca 100644
--- a/drivers/hid/hid-cougar.c
+++ b/drivers/hid/hid-cougar.c
@@ -321,7 +321,7 @@ static const struct kernel_param_ops cougar_g6_is_space_ops = {
 };
 module_param_cb(g6_is_space, &cougar_g6_is_space_ops, &g6_is_space, 0644);
 
-static struct hid_device_id cougar_id_table[] = {
+static const struct hid_device_id cougar_id_table[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SOLID_YEAR,
 			 USB_DEVICE_ID_COUGAR_500K_GAMING_KEYBOARD) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_SOLID_YEAR,
-- 
2.27.0


  reply	other threads:[~2020-07-27 13:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 13:21 [PATCH 0/2] HID: Constify static struct hid_device_id Rikard Falkeborn
2020-07-27 13:21 ` Rikard Falkeborn [this message]
2020-07-27 13:22 ` [PATCH 2/2] HID: macally: Constify macally_id_table Rikard Falkeborn
2020-08-17  9:52 ` [PATCH 0/2] HID: Constify static struct hid_device_id Jiri Kosina

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=20200727132200.32510-2-rikard.falkeborn@gmail.com \
    --to=rikard.falkeborn@gmail.com \
    --cc=alexhenrie24@gmail.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=dmlambea@gmail.com \
    --cc=jikos@kernel.org \
    --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).