Skip to content

Commit

Permalink
ALSA: parisc: Constify hw_constraints
Browse files Browse the repository at this point in the history
snd_pcm_hw_constraint_list(), *_ratnums() and *_ratdens() receive the
const pointers.  Constify the corresponding static objects for better
hardening.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
tiwai committed Jun 9, 2017
1 parent 7b3f477 commit d236d36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sound/parisc/harmony.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,22 @@ MODULE_DEVICE_TABLE(parisc, snd_harmony_devtable);
#define NAME "harmony"
#define PFX NAME ": "

static unsigned int snd_harmony_rates[] = {
static const unsigned int snd_harmony_rates[] = {
5512, 6615, 8000, 9600,
11025, 16000, 18900, 22050,
27428, 32000, 33075, 37800,
44100, 48000
};

static unsigned int rate_bits[14] = {
static const unsigned int rate_bits[14] = {
HARMONY_SR_5KHZ, HARMONY_SR_6KHZ, HARMONY_SR_8KHZ,
HARMONY_SR_9KHZ, HARMONY_SR_11KHZ, HARMONY_SR_16KHZ,
HARMONY_SR_18KHZ, HARMONY_SR_22KHZ, HARMONY_SR_27KHZ,
HARMONY_SR_32KHZ, HARMONY_SR_33KHZ, HARMONY_SR_37KHZ,
HARMONY_SR_44KHZ, HARMONY_SR_48KHZ
};

static struct snd_pcm_hw_constraint_list hw_constraint_rates = {
static const struct snd_pcm_hw_constraint_list hw_constraint_rates = {
.count = ARRAY_SIZE(snd_harmony_rates),
.list = snd_harmony_rates,
.mask = 0,
Expand Down

0 comments on commit d236d36

Please sign in to comment.