From: Arvind Yadav <arvind.yadav.cs@gmail.com>
To: wg@grandegger.com, mkl@pengutronix.de, madalin.bucur@nxp.com,
davem@davemloft.net, sergei.shtylyov@cogentembedded.com,
grygorii.strashko@ti.com
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-can@vger.kernel.org
Subject: [PATCH 1/4] can: constify platform_device_id
Date: Sun, 13 Aug 2017 16:41:45 +0530 [thread overview]
Message-ID: <1502622705-11169-2-git-send-email-arvind.yadav.cs@gmail.com> (raw)
In-Reply-To: <1502622705-11169-1-git-send-email-arvind.yadav.cs@gmail.com>
platform_device_id are not supposed to change at runtime. All functions
working with platform_device_id provided by <linux/platform_device.h>
work with const platform_device_id. So mark the non-const structs as
const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/net/can/c_can/c_can_platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index e36d105..46a746e 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -220,7 +220,7 @@ static const struct c_can_driver_data am3352_dcan_drvdata = {
.raminit_bits = am3352_raminit_bits,
};
-static struct platform_device_id c_can_id_table[] = {
+static const struct platform_device_id c_can_id_table[] = {
{
.name = KBUILD_MODNAME,
.driver_data = (kernel_ulong_t)&c_can_drvdata,
--
2.7.4
next prev parent reply other threads:[~2017-08-13 11:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-13 11:11 [PATCH 0/4] constify net platform_device_id Arvind Yadav
2017-08-13 11:11 ` Arvind Yadav [this message]
2017-08-14 3:12 ` David Miller
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=1502622705-11169-2-git-send-email-arvind.yadav.cs@gmail.com \
--to=arvind.yadav.cs@gmail.com \
--cc=davem@davemloft.net \
--cc=grygorii.strashko@ti.com \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=madalin.bucur@nxp.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=wg@grandegger.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).