diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-11-23 11:53:33 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-11-23 17:15:36 +0300 |
commit | cab941b7e5cf054502b01f776db724400ee5c1b6 (patch) | |
tree | dc80dec664d8f67b7ce213bd0d7cfb3b7cf42717 /sound/usb/card.h | |
parent | c15871e17fc6efb98176b92b4152019876dbec24 (diff) | |
download | linux-cab941b7e5cf054502b01f776db724400ee5c1b6.tar.xz |
ALSA: usb-audio: Constify audioformat pointer references
The audioformat is referred in many places but most of usages are
read-only. Let's add const prefix in the possible places.
Tested-by: Keith Milner <kamilner@superlative.org>
Tested-by: Dylan Robinson <dylan_robinson@motu.com>
Link: https://lore.kernel.org/r/20201123085347.19667-28-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r-- | sound/usb/card.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h index cde492e9581a..53f0ce61f858 100644 --- a/sound/usb/card.h +++ b/sound/usb/card.h @@ -120,7 +120,7 @@ struct snd_usb_endpoint { bool need_setup; /* (re-)need for configure? */ /* for hw constraints */ - struct audioformat *cur_audiofmt; + const struct audioformat *cur_audiofmt; unsigned int cur_rate; snd_pcm_format_t cur_format; unsigned int cur_channels; @@ -142,7 +142,7 @@ struct snd_usb_substream { int direction; /* playback or capture */ int interface; /* current interface */ int endpoint; /* assigned endpoint */ - struct audioformat *cur_audiofmt; /* current audioformat pointer (for hw_params callback) */ + const struct audioformat *cur_audiofmt; /* current audioformat pointer (for hw_params callback) */ struct snd_usb_power_domain *str_pd; /* UAC3 Power Domain for streaming path */ snd_pcm_format_t pcm_format; /* current audio format (for hw_params callback) */ unsigned int channels; /* current number of channels (for hw_params callback) */ |