summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-08-06 12:18:56 +0530
committerTakashi Iwai <tiwai@suse.de>2017-08-06 22:20:10 +0200
commit8824ae2de876f7e73ca64937dca88e558db5b681 (patch)
tree6f6c1d171c06e0677bb96b3c415597e5a8d1c48c
parent57ee11eaa1e985d73a2762d28ee1eeef037d10ec (diff)
downloadlinux-8824ae2de876f7e73ca64937dca88e558db5b681.tar.gz
linux-8824ae2de876f7e73ca64937dca88e558db5b681.tar.bz2
linux-8824ae2de876f7e73ca64937dca88e558db5b681.zip
ALSA: usb-audio: constify usb_device_id.
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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/usb/card.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c
index 6640277a725b..3dc36d913550 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,