From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: tglx@linutronix.de, marcos.souza.org@gmail.com,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: i8042: constify pnp_device_id
Date: Wed, 16 Aug 2017 17:43:36 -0700 [thread overview]
Message-ID: <20170817004336.GD25491@dtor-ws> (raw)
In-Reply-To: <5b0366a4ca5786168a4ef8e80e7125f7afbd51c6.1502861813.git.arvind.yadav.cs@gmail.com>
On Wed, Aug 16, 2017 at 11:11:42AM +0530, Arvind Yadav wrote:
> pnp_device_id are not supposed to change at runtime. All functions
> working with pnp_device_id provided by <linux/pnp.h> work with
> const pnp_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/serio/i8042-x86ia64io.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
> index f932a83..ae81e57 100644
> --- a/drivers/input/serio/i8042-x86ia64io.h
> +++ b/drivers/input/serio/i8042-x86ia64io.h
> @@ -927,7 +927,7 @@ static int i8042_pnp_aux_probe(struct pnp_dev *dev, const struct pnp_device_id *
> return 0;
> }
>
> -static struct pnp_device_id pnp_kbd_devids[] = {
> +static const struct pnp_device_id pnp_kbd_devids[] = {
> { .id = "PNP0300", .driver_data = 0 },
> { .id = "PNP0301", .driver_data = 0 },
> { .id = "PNP0302", .driver_data = 0 },
> @@ -957,7 +957,7 @@ static struct pnp_driver i8042_pnp_kbd_driver = {
> },
> };
>
> -static struct pnp_device_id pnp_aux_devids[] = {
> +static const struct pnp_device_id pnp_aux_devids[] = {
> { .id = "AUI0200", .driver_data = 0 },
> { .id = "FJC6000", .driver_data = 0 },
> { .id = "FJC6001", .driver_data = 0 },
> --
> 2.7.4
>
--
Dmitry
prev parent reply other threads:[~2017-08-17 0:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 5:41 [PATCH] Input: i8042: constify pnp_device_id Arvind Yadav
2017-08-17 0:43 ` Dmitry Torokhov [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=20170817004336.GD25491@dtor-ws \
--to=dmitry.torokhov@gmail.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcos.souza.org@gmail.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.