alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] constify ALSA usb_device_id.
@ 2017-08-06  6:48 Arvind Yadav
  2017-08-06  6:48 ` [PATCH 1/7] ALSA: 6fire: constify usb_device_id Arvind Yadav
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Arvind Yadav @ 2017-08-06  6:48 UTC (permalink / raw)
  To: perex, tiwai, zonque, clemens; +Cc: alsa-devel, linux-kernel

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.

Arvind Yadav (7):
  [PATCH 1/7] ALSA: 6fire: constify usb_device_id.
  [PATCH 2/7] ALSA: bcd2000: constify usb_device_id.
  [PATCH 3/7] ALSA: snd-usb-caiaq: constify usb_device_id.
  [PATCH 4/7] ALSA: usb-audio: constify usb_device_id.
  [PATCH 5/7] ALSA: ua101: constify usb_device_id.
  [PATCH 6/7] ALSA: us122l: constify usb_device_id.
  [PATCH 7/7] ALSA: usbusx2y: constify usb_device_id.

 sound/usb/6fire/chip.c      | 2 +-
 sound/usb/bcd2000/bcd2000.c | 2 +-
 sound/usb/caiaq/device.c    | 2 +-
 sound/usb/card.c            | 4 ++--
 sound/usb/misc/ua101.c      | 2 +-
 sound/usb/usx2y/us122l.c    | 2 +-
 sound/usb/usx2y/usbusx2y.c  | 2 +-
 7 files changed, 8 insertions(+), 8 deletions(-)

-- 
2.7.4

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

* [PATCH 1/7] ALSA: 6fire: constify usb_device_id.
  2017-08-06  6:48 [PATCH 0/7] constify ALSA usb_device_id Arvind Yadav
@ 2017-08-06  6:48 ` Arvind Yadav
  2017-08-06  6:48 ` [PATCH 2/7] ALSA: bcd2000: " Arvind Yadav
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arvind Yadav @ 2017-08-06  6:48 UTC (permalink / raw)
  To: perex, tiwai, zonque, clemens; +Cc: alsa-devel, linux-kernel

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>
---
 sound/usb/6fire/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/6fire/chip.c b/sound/usb/6fire/chip.c
index dcddfc3..bc2a24f 100644
--- a/sound/usb/6fire/chip.c
+++ b/sound/usb/6fire/chip.c
@@ -198,7 +198,7 @@ static void usb6fire_chip_disconnect(struct usb_interface *intf)
 	}
 }
 
-static struct usb_device_id device_table[] = {
+static const struct usb_device_id device_table[] = {
 	{
 		.match_flags = USB_DEVICE_ID_MATCH_DEVICE,
 		.idVendor = 0x0ccd,
-- 
2.7.4

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

* [PATCH 2/7] ALSA: bcd2000: constify usb_device_id.
  2017-08-06  6:48 [PATCH 0/7] constify ALSA usb_device_id Arvind Yadav
  2017-08-06  6:48 ` [PATCH 1/7] ALSA: 6fire: constify usb_device_id Arvind Yadav
@ 2017-08-06  6:48 ` Arvind Yadav
  2017-08-06  6:48 ` [PATCH 3/7] ALSA: snd-usb-caiaq: " Arvind Yadav
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arvind Yadav @ 2017-08-06  6:48 UTC (permalink / raw)
  To: perex, tiwai, zonque, clemens; +Cc: alsa-devel, linux-kernel

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>
---
 sound/usb/bcd2000/bcd2000.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/bcd2000/bcd2000.c b/sound/usb/bcd2000/bcd2000.c
index 2ff9d57..7371e5b 100644
--- a/sound/usb/bcd2000/bcd2000.c
+++ b/sound/usb/bcd2000/bcd2000.c
@@ -29,7 +29,7 @@
 #define PREFIX "snd-bcd2000: "
 #define BUFSIZE 64
 
-static struct usb_device_id id_table[] = {
+static const struct usb_device_id id_table[] = {
 	{ USB_DEVICE(0x1397, 0x00bd) },
 	{ },
 };
-- 
2.7.4

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

* [PATCH 3/7] ALSA: snd-usb-caiaq: constify usb_device_id.
  2017-08-06  6:48 [PATCH 0/7] constify ALSA usb_device_id Arvind Yadav
  2017-08-06  6:48 ` [PATCH 1/7] ALSA: 6fire: constify usb_device_id Arvind Yadav
  2017-08-06  6:48 ` [PATCH 2/7] ALSA: bcd2000: " Arvind Yadav
@ 2017-08-06  6:48 ` Arvind Yadav
  2017-08-06  6:48 ` [PATCH 4/7] ALSA: usb-audio: " Arvind Yadav
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arvind Yadav @ 2017-08-06  6:48 UTC (permalink / raw)
  To: perex, tiwai, zonque, clemens; +Cc: alsa-devel, linux-kernel

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>
---
 sound/usb/caiaq/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/caiaq/device.c b/sound/usb/caiaq/device.c
index b871ba4..0fb6b1b7 100644
--- a/sound/usb/caiaq/device.c
+++ b/sound/usb/caiaq/device.c
@@ -81,7 +81,7 @@ enum {
 	DEPTH_32	= 3
 };
 
-static struct usb_device_id snd_usb_id_table[] = {
+static const struct usb_device_id snd_usb_id_table[] = {
 	{
 		.match_flags =	USB_DEVICE_ID_MATCH_DEVICE,
 		.idVendor =	USB_VID_NATIVEINSTRUMENTS,
-- 
2.7.4

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

* [PATCH 4/7] ALSA: usb-audio: constify usb_device_id.
  2017-08-06  6:48 [PATCH 0/7] constify ALSA usb_device_id Arvind Yadav
                   ` (2 preceding siblings ...)
  2017-08-06  6:48 ` [PATCH 3/7] ALSA: snd-usb-caiaq: " Arvind Yadav
@ 2017-08-06  6:48 ` Arvind Yadav
  2017-08-06  6:48 ` [PATCH 5/7] ALSA: ua101: " Arvind Yadav
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arvind Yadav @ 2017-08-06  6:48 UTC (permalink / raw)
  To: perex, tiwai, zonque, clemens; +Cc: alsa-devel, linux-kernel

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>
---
 sound/usb/card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/usb/card.c b/sound/usb/card.c
index 6640277..3dc36d9 100644
--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -486,7 +486,7 @@ static bool get_alias_id(struct usb_device *dev, unsigned int *id)
 	return false;
 }
 
-static struct usb_device_id usb_audio_ids[]; /* defined below */
+static const struct usb_device_id usb_audio_ids[]; /* defined below */
 
 /* look for the corresponding quirk */
 static const struct snd_usb_audio_quirk *
@@ -814,7 +814,7 @@ static int usb_audio_reset_resume(struct usb_interface *intf)
 #define usb_audio_reset_resume	NULL
 #endif		/* CONFIG_PM */
 
-static struct usb_device_id usb_audio_ids [] = {
+static const struct usb_device_id usb_audio_ids [] = {
 #include "quirks-table.h"
     { .match_flags = (USB_DEVICE_ID_MATCH_INT_CLASS | USB_DEVICE_ID_MATCH_INT_SUBCLASS),
       .bInterfaceClass = USB_CLASS_AUDIO,
-- 
2.7.4

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

* [PATCH 5/7] ALSA: ua101: constify usb_device_id.
  2017-08-06  6:48 [PATCH 0/7] constify ALSA usb_device_id Arvind Yadav
                   ` (3 preceding siblings ...)
  2017-08-06  6:48 ` [PATCH 4/7] ALSA: usb-audio: " Arvind Yadav
@ 2017-08-06  6:48 ` Arvind Yadav
  2017-08-06  6:48 ` [PATCH 6/7] ALSA: us122l: " Arvind Yadav
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Arvind Yadav @ 2017-08-06  6:48 UTC (permalink / raw)
  To: perex, tiwai, zonque, clemens; +Cc: alsa-devel, linux-kernel

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>
---
 sound/usb/misc/ua101.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/misc/ua101.c b/sound/usb/misc/ua101.c
index c19a5dd..b05cd38 100644
--- a/sound/usb/misc/ua101.c
+++ b/sound/usb/misc/ua101.c
@@ -1366,7 +1366,7 @@ static void ua101_disconnect(struct usb_interface *interface)
 	mutex_unlock(&devices_mutex);
 }
 
-static struct usb_device_id ua101_ids[] = {
+static const struct usb_device_id ua101_ids[] = {
 	{ USB_DEVICE(0x0582, 0x0044) }, /* UA-1000 high speed */
 	{ USB_DEVICE(0x0582, 0x007d) }, /* UA-101 high speed */
 	{ USB_DEVICE(0x0582, 0x008d) }, /* UA-101 full speed */
-- 
2.7.4

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

* [PATCH 6/7] ALSA: us122l: constify usb_device_id.
  2017-08-06  6:48 [PATCH 0/7] constify ALSA usb_device_id Arvind Yadav
                   ` (4 preceding siblings ...)
  2017-08-06  6:48 ` [PATCH 5/7] ALSA: ua101: " Arvind Yadav
@ 2017-08-06  6:48 ` Arvind Yadav
  2017-08-06  6:48 ` [PATCH 7/7] ALSA: usbusx2y: " Arvind Yadav
  2017-08-06 20:21 ` [PATCH 0/7] constify ALSA usb_device_id Takashi Iwai
  7 siblings, 0 replies; 9+ messages in thread
From: Arvind Yadav @ 2017-08-06  6:48 UTC (permalink / raw)
  To: perex, tiwai, zonque, clemens; +Cc: alsa-devel, linux-kernel

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>
---
 sound/usb/usx2y/us122l.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/usx2y/us122l.c b/sound/usb/usx2y/us122l.c
index a33e31b2..b49d6e9 100644
--- a/sound/usb/usx2y/us122l.c
+++ b/sound/usb/usx2y/us122l.c
@@ -736,7 +736,7 @@ static int snd_us122l_resume(struct usb_interface *intf)
 	return err;
 }
 
-static struct usb_device_id snd_us122l_usb_id_table[] = {
+static const struct usb_device_id snd_us122l_usb_id_table[] = {
 	{
 		.match_flags =	USB_DEVICE_ID_MATCH_DEVICE,
 		.idVendor =	0x0644,
-- 
2.7.4

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

* [PATCH 7/7] ALSA: usbusx2y: constify usb_device_id.
  2017-08-06  6:48 [PATCH 0/7] constify ALSA usb_device_id Arvind Yadav
                   ` (5 preceding siblings ...)
  2017-08-06  6:48 ` [PATCH 6/7] ALSA: us122l: " Arvind Yadav
@ 2017-08-06  6:48 ` Arvind Yadav
  2017-08-06 20:21 ` [PATCH 0/7] constify ALSA usb_device_id Takashi Iwai
  7 siblings, 0 replies; 9+ messages in thread
From: Arvind Yadav @ 2017-08-06  6:48 UTC (permalink / raw)
  To: perex, tiwai, zonque, clemens; +Cc: alsa-devel, linux-kernel

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>
---
 sound/usb/usx2y/usbusx2y.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/usx2y/usbusx2y.c b/sound/usb/usx2y/usbusx2y.c
index 91e0e2a..4569c0e 100644
--- a/sound/usb/usx2y/usbusx2y.c
+++ b/sound/usb/usx2y/usbusx2y.c
@@ -313,7 +313,7 @@ static void usX2Y_unlinkSeq(struct snd_usX2Y_AsyncSeq *S)
 }
 
 
-static struct usb_device_id snd_usX2Y_usb_id_table[] = {
+static const struct usb_device_id snd_usX2Y_usb_id_table[] = {
 	{
 		.match_flags =	USB_DEVICE_ID_MATCH_DEVICE,
 		.idVendor =	0x1604,
-- 
2.7.4

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

* Re: [PATCH 0/7] constify ALSA usb_device_id.
  2017-08-06  6:48 [PATCH 0/7] constify ALSA usb_device_id Arvind Yadav
                   ` (6 preceding siblings ...)
  2017-08-06  6:48 ` [PATCH 7/7] ALSA: usbusx2y: " Arvind Yadav
@ 2017-08-06 20:21 ` Takashi Iwai
  7 siblings, 0 replies; 9+ messages in thread
From: Takashi Iwai @ 2017-08-06 20:21 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: alsa-devel, clemens, linux-kernel, zonque

On Sun, 06 Aug 2017 08:48:52 +0200,
Arvind Yadav wrote:
> 
> 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.
> 
> Arvind Yadav (7):
>   [PATCH 1/7] ALSA: 6fire: constify usb_device_id.
>   [PATCH 2/7] ALSA: bcd2000: constify usb_device_id.
>   [PATCH 3/7] ALSA: snd-usb-caiaq: constify usb_device_id.
>   [PATCH 4/7] ALSA: usb-audio: constify usb_device_id.
>   [PATCH 5/7] ALSA: ua101: constify usb_device_id.
>   [PATCH 6/7] ALSA: us122l: constify usb_device_id.
>   [PATCH 7/7] ALSA: usbusx2y: constify usb_device_id.

Applied all seven patches now.  Thanks.


Takashi

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

end of thread, other threads:[~2017-08-06 20:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-06  6:48 [PATCH 0/7] constify ALSA usb_device_id Arvind Yadav
2017-08-06  6:48 ` [PATCH 1/7] ALSA: 6fire: constify usb_device_id Arvind Yadav
2017-08-06  6:48 ` [PATCH 2/7] ALSA: bcd2000: " Arvind Yadav
2017-08-06  6:48 ` [PATCH 3/7] ALSA: snd-usb-caiaq: " Arvind Yadav
2017-08-06  6:48 ` [PATCH 4/7] ALSA: usb-audio: " Arvind Yadav
2017-08-06  6:48 ` [PATCH 5/7] ALSA: ua101: " Arvind Yadav
2017-08-06  6:48 ` [PATCH 6/7] ALSA: us122l: " Arvind Yadav
2017-08-06  6:48 ` [PATCH 7/7] ALSA: usbusx2y: " Arvind Yadav
2017-08-06 20:21 ` [PATCH 0/7] constify ALSA usb_device_id Takashi Iwai

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