netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: 3c509: constify pnp_device_id
       [not found] <60c34272432b3411cd5d55728c62481e133f32a6.1502859040.git.arvind.yadav.cs@gmail.com>
@ 2017-08-16  4:55 ` Arvind Yadav
  2017-08-16 18:26   ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-16  4:55 UTC (permalink / raw)
  To: davem, jarod, dhowells; +Cc: linux-kernel, netdev

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>
---
 drivers/net/ethernet/3com/3c509.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/3com/3c509.c b/drivers/net/ethernet/3com/3c509.c
index f66c971..077d01d 100644
--- a/drivers/net/ethernet/3com/3c509.c
+++ b/drivers/net/ethernet/3com/3c509.c
@@ -392,7 +392,7 @@ static struct isa_driver el3_isa_driver = {
 static int isa_registered;
 
 #ifdef CONFIG_PNP
-static struct pnp_device_id el3_pnp_ids[] = {
+static const struct pnp_device_id el3_pnp_ids[] = {
 	{ .id = "TCM5090" }, /* 3Com Etherlink III (TP) */
 	{ .id = "TCM5091" }, /* 3Com Etherlink III */
 	{ .id = "TCM5094" }, /* 3Com Etherlink III (combo) */
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: 3c509: constify pnp_device_id
  2017-08-16  4:55 ` [PATCH] net: 3c509: constify pnp_device_id Arvind Yadav
@ 2017-08-16 18:26   ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-08-16 18:26 UTC (permalink / raw)
  To: arvind.yadav.cs; +Cc: jarod, dhowells, linux-kernel, netdev

From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Wed, 16 Aug 2017 10:25:59 +0530

> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-16 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <60c34272432b3411cd5d55728c62481e133f32a6.1502859040.git.arvind.yadav.cs@gmail.com>
2017-08-16  4:55 ` [PATCH] net: 3c509: constify pnp_device_id Arvind Yadav
2017-08-16 18:26   ` David Miller

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).