netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 04/35] net: irda: irda-usb: constify usb_device_id
@ 2017-08-08 15:56 Arvind Yadav
  2017-08-08 15:56 ` [PATCH 05/35] net: irda: kingsun: " Arvind Yadav
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
  To: kvalo, samuel; +Cc: linux-kernel, netdev

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

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

diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c
index 6f3c805..723e49b 100644
--- a/drivers/net/irda/irda-usb.c
+++ b/drivers/net/irda/irda-usb.c
@@ -72,7 +72,7 @@
 static int qos_mtt_bits = 0;
 
 /* These are the currently known IrDA USB dongles. Add new dongles here */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
 	/* ACTiSYS Corp.,  ACT-IR2000U FIR-USB Adapter */
 	{ USB_DEVICE(0x9c4, 0x011), .driver_info = IUC_SPEED_BUG | IUC_NO_WINDOW },
 	/* Look like ACTiSYS, Report : IBM Corp., IBM UltraPort IrDA */
-- 
2.7.4

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

* [PATCH 05/35] net: irda: kingsun: constify usb_device_id
  2017-08-08 15:56 [PATCH 04/35] net: irda: irda-usb: constify usb_device_id Arvind Yadav
@ 2017-08-08 15:56 ` Arvind Yadav
  2017-08-08 15:56 ` [PATCH 06/35] net: irda: ks959: " Arvind Yadav
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
  To: kvalo, samuel; +Cc: linux-kernel, netdev

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

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

diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c
index 24c0f16..4fd4ac2 100644
--- a/drivers/net/irda/kingsun-sir.c
+++ b/drivers/net/irda/kingsun-sir.c
@@ -85,7 +85,7 @@
 #define KING_PRODUCT_ID 0x4200
 
 /* These are the currently known USB ids */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
     /* KingSun Co,Ltd  IrDA/USB Bridge */
     { USB_DEVICE(KING_VENDOR_ID, KING_PRODUCT_ID) },
     { }
-- 
2.7.4

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

* [PATCH 06/35] net: irda: ks959: constify usb_device_id
  2017-08-08 15:56 [PATCH 04/35] net: irda: irda-usb: constify usb_device_id Arvind Yadav
  2017-08-08 15:56 ` [PATCH 05/35] net: irda: kingsun: " Arvind Yadav
@ 2017-08-08 15:56 ` Arvind Yadav
  2017-08-08 15:56 ` [PATCH 07/35] net: irda: ksdazzle: " Arvind Yadav
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
  To: kvalo, samuel; +Cc: linux-kernel, netdev

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

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

diff --git a/drivers/net/irda/ks959-sir.c b/drivers/net/irda/ks959-sir.c
index 3affded..8025741 100644
--- a/drivers/net/irda/ks959-sir.c
+++ b/drivers/net/irda/ks959-sir.c
@@ -133,7 +133,7 @@
 #define KS959_PRODUCT_ID 0x4959
 
 /* These are the currently known USB ids */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
 	/* KingSun Co,Ltd  IrDA/USB Bridge */
 	{USB_DEVICE(KS959_VENDOR_ID, KS959_PRODUCT_ID)},
 	{}
-- 
2.7.4

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

* [PATCH 07/35] net: irda: ksdazzle: constify usb_device_id
  2017-08-08 15:56 [PATCH 04/35] net: irda: irda-usb: constify usb_device_id Arvind Yadav
  2017-08-08 15:56 ` [PATCH 05/35] net: irda: kingsun: " Arvind Yadav
  2017-08-08 15:56 ` [PATCH 06/35] net: irda: ks959: " Arvind Yadav
@ 2017-08-08 15:56 ` Arvind Yadav
  2017-08-08 15:56 ` [PATCH 08/35] net: irda: mcs7780: " Arvind Yadav
  2017-08-08 15:56 ` [PATCH 09/35] net: irda: stir4200: " Arvind Yadav
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
  To: kvalo, samuel; +Cc: linux-kernel, netdev

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

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

diff --git a/drivers/net/irda/ksdazzle-sir.c b/drivers/net/irda/ksdazzle-sir.c
index 741452c..d2a0755 100644
--- a/drivers/net/irda/ksdazzle-sir.c
+++ b/drivers/net/irda/ksdazzle-sir.c
@@ -97,7 +97,7 @@
 #define KSDAZZLE_PRODUCT_ID 0x4100
 
 /* These are the currently known USB ids */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
 	/* KingSun Co,Ltd  IrDA/USB Bridge */
 	{USB_DEVICE(KSDAZZLE_VENDOR_ID, KSDAZZLE_PRODUCT_ID)},
 	{}
-- 
2.7.4

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

* [PATCH 08/35] net: irda: mcs7780: constify usb_device_id
  2017-08-08 15:56 [PATCH 04/35] net: irda: irda-usb: constify usb_device_id Arvind Yadav
                   ` (2 preceding siblings ...)
  2017-08-08 15:56 ` [PATCH 07/35] net: irda: ksdazzle: " Arvind Yadav
@ 2017-08-08 15:56 ` Arvind Yadav
  2017-08-08 15:56 ` [PATCH 09/35] net: irda: stir4200: " Arvind Yadav
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
  To: kvalo, samuel; +Cc: linux-kernel, netdev

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

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

diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c
index 6f6ed75..32fa4a9 100644
--- a/drivers/net/irda/mcs7780.c
+++ b/drivers/net/irda/mcs7780.c
@@ -66,7 +66,7 @@
 #define MCS_VENDOR_ID 0x9710
 #define MCS_PRODUCT_ID 0x7780
 
-static struct usb_device_id mcs_table[] = {
+static const struct usb_device_id mcs_table[] = {
 	/* MosChip Corp.,  MCS7780 FIR-USB Adapter */
 	{USB_DEVICE(MCS_VENDOR_ID, MCS_PRODUCT_ID)},
 	{},
-- 
2.7.4

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

* [PATCH 09/35] net: irda: stir4200: constify usb_device_id
  2017-08-08 15:56 [PATCH 04/35] net: irda: irda-usb: constify usb_device_id Arvind Yadav
                   ` (3 preceding siblings ...)
  2017-08-08 15:56 ` [PATCH 08/35] net: irda: mcs7780: " Arvind Yadav
@ 2017-08-08 15:56 ` Arvind Yadav
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-08 15:56 UTC (permalink / raw)
  To: kvalo, samuel; +Cc: linux-kernel, netdev

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

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

diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c
index 7ee5148..ee2cb70 100644
--- a/drivers/net/irda/stir4200.c
+++ b/drivers/net/irda/stir4200.c
@@ -183,7 +183,7 @@ struct stir_cb {
 
 
 /* These are the currently known USB ids */
-static struct usb_device_id dongles[] = {
+static const struct usb_device_id dongles[] = {
     /* SigmaTel, Inc,  STIr4200 IrDA/USB Bridge */
     { USB_DEVICE(0x066f, 0x4200) },
     { }
-- 
2.7.4

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

end of thread, other threads:[~2017-08-08 15:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-08 15:56 [PATCH 04/35] net: irda: irda-usb: constify usb_device_id Arvind Yadav
2017-08-08 15:56 ` [PATCH 05/35] net: irda: kingsun: " Arvind Yadav
2017-08-08 15:56 ` [PATCH 06/35] net: irda: ks959: " Arvind Yadav
2017-08-08 15:56 ` [PATCH 07/35] net: irda: ksdazzle: " Arvind Yadav
2017-08-08 15:56 ` [PATCH 08/35] net: irda: mcs7780: " Arvind Yadav
2017-08-08 15:56 ` [PATCH 09/35] net: irda: stir4200: " Arvind Yadav

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