linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: sameo@linux.intel.com, clement.perrochaud@effinnov.com,
	charles.gorand@effinnov.com, r.baldyga@samsung.com,
	k.opasiak@samsung.com, davem@davemloft.net
Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: [PATCH 6/8] nfc: s3fwrn5: constify i2c_device_id
Date: Mon, 21 Aug 2017 22:33:58 +0530	[thread overview]
Message-ID: <1503335040-27101-7-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1503335040-27101-1-git-send-email-arvind.yadav.cs@gmail.com>

i2c_device_id are not supposed to change at runtime. All functions
working with i2c_device_id provided by <linux/i2c.h> work with
const i2c_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/nfc/s3fwrn5/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/s3fwrn5/i2c.c b/drivers/nfc/s3fwrn5/i2c.c
index 3f09d7f..4da409e 100644
--- a/drivers/nfc/s3fwrn5/i2c.c
+++ b/drivers/nfc/s3fwrn5/i2c.c
@@ -276,7 +276,7 @@ static int s3fwrn5_i2c_remove(struct i2c_client *client)
 	return 0;
 }
 
-static struct i2c_device_id s3fwrn5_i2c_id_table[] = {
+static const struct i2c_device_id s3fwrn5_i2c_id_table[] = {
 	{S3FWRN5_I2C_DRIVER_NAME, 0},
 	{}
 };
-- 
2.7.4

  parent reply	other threads:[~2017-08-21 17:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 17:03 [PATCH 0/8] constify nfc i2c_device_id Arvind Yadav
2017-08-21 17:03 ` [PATCH 1/8] nfc: microread: constify i2c_device_id Arvind Yadav
2017-08-21 17:03 ` [PATCH 2/8] nfc: nfcmrvl: " Arvind Yadav
2017-08-21 17:03 ` [PATCH 3/8] nfc: nxp-nci: " Arvind Yadav
2017-08-21 17:03 ` [PATCH 4/8] nfc: pn533: " Arvind Yadav
2017-08-21 17:03 ` [PATCH 5/8] nfc: pn544: " Arvind Yadav
2017-08-21 17:03 ` Arvind Yadav [this message]
2017-08-21 17:03 ` [PATCH 7/8] nfc: st-nci: " Arvind Yadav
2017-08-21 17:04 ` [PATCH 8/8] nfc: st21nfca: " Arvind Yadav
2017-11-06  0:00 ` [PATCH 0/8] constify nfc i2c_device_id Samuel Ortiz

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=1503335040-27101-7-git-send-email-arvind.yadav.cs@gmail.com \
    --to=arvind.yadav.cs@gmail.com \
    --cc=charles.gorand@effinnov.com \
    --cc=clement.perrochaud@effinnov.com \
    --cc=davem@davemloft.net \
    --cc=k.opasiak@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=r.baldyga@samsung.com \
    --cc=sameo@linux.intel.com \
    /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).