From: Guenter Roeck <linux@roeck-us.net>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: jdelvare@suse.com, linux-kernel@vger.kernel.org,
linux-hwmon@vger.kernel.org
Subject: Re: hwmon: ftsteutates: constify i2c_device_id
Date: Tue, 29 Aug 2017 17:45:29 -0700 [thread overview]
Message-ID: <20170830004529.GA15111@roeck-us.net> (raw)
In-Reply-To: <f172aa5ff3cae05e9744bcd3b184a732df17bfeb.1503170724.git.arvind.yadav.cs@gmail.com>
On Sun, Aug 20, 2017 at 12:56:34AM +0530, Arvind Yadav wrote:
> 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>
Appled to hwmon-next.
Thanks,
Guenter
> ---
> drivers/hwmon/ftsteutates.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/ftsteutates.c b/drivers/hwmon/ftsteutates.c
> index 0f0277e..317e45f 100644
> --- a/drivers/hwmon/ftsteutates.c
> +++ b/drivers/hwmon/ftsteutates.c
> @@ -60,7 +60,7 @@
>
> static const unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
>
> -static struct i2c_device_id fts_id[] = {
> +static const struct i2c_device_id fts_id[] = {
> { "ftsteutates", 0 },
> { }
> };
prev parent reply other threads:[~2017-08-30 0:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-19 19:26 [PATCH] hwmon: ftsteutates: constify i2c_device_id Arvind Yadav
2017-08-30 0:45 ` Guenter Roeck [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=20170830004529.GA15111@roeck-us.net \
--to=linux@roeck-us.net \
--cc=arvind.yadav.cs@gmail.com \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@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