Skip to content

Commit

Permalink
ALSA: Use const struct ac97_quirk
Browse files Browse the repository at this point in the history
Use const to reduce data by ~3Kb.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Joe Perches authored and Takashi Iwai committed Apr 5, 2015
1 parent 751e221 commit eab0fbf
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
4 changes: 3 additions & 1 deletion include/sound/ac97_codec.h
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,9 @@ struct ac97_quirk {
int type; /* quirk type above */
};

int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override);
int snd_ac97_tune_hardware(struct snd_ac97 *ac97,
const struct ac97_quirk *quirk,
const char *override);
int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate);

/*
Expand Down
3 changes: 2 additions & 1 deletion sound/pci/ac97/ac97_codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2902,7 +2902,8 @@ static int apply_quirk_str(struct snd_ac97 *ac97, const char *typestr)
* Return: Zero if successful, or a negative error code on failure.
*/

int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override)
int snd_ac97_tune_hardware(struct snd_ac97 *ac97,
const struct ac97_quirk *quirk, const char *override)
{
int result;

Expand Down
2 changes: 1 addition & 1 deletion sound/pci/ad1889.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ snd_ad1889_proc_init(struct snd_ad1889 *chip)
snd_info_set_text_ops(entry, chip, snd_ad1889_proc_read);
}

static struct ac97_quirk ac97_quirks[] = {
static const struct ac97_quirk ac97_quirks[] = {
{
.subvendor = 0x11d4, /* AD */
.subdevice = 0x1889, /* AD1889 */
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/atiixp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1390,7 +1390,7 @@ static irqreturn_t snd_atiixp_interrupt(int irq, void *dev_id)
* ac97 mixer section
*/

static struct ac97_quirk ac97_quirks[] = {
static const struct ac97_quirk ac97_quirks[] = {
{
.subvendor = 0x103c,
.subdevice = 0x006b,
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/cs5535audio/cs5535audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static char *ac97_quirk;
module_param(ac97_quirk, charp, 0444);
MODULE_PARM_DESC(ac97_quirk, "AC'97 board specific workarounds.");

static struct ac97_quirk ac97_quirks[] = {
static const struct ac97_quirk ac97_quirks[] = {
#if 0 /* Not yet confirmed if all 5536 boards are HP only */
{
.subvendor = PCI_VENDOR_ID_AMD,
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/intel8x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -1795,7 +1795,7 @@ static struct ac97_pcm ac97_pcm_defs[] = {
},
};

static struct ac97_quirk ac97_quirks[] = {
static const struct ac97_quirk ac97_quirks[] = {
{
.subvendor = 0x0e11,
.subdevice = 0x000e,
Expand Down
2 changes: 1 addition & 1 deletion sound/pci/via82xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1812,7 +1812,7 @@ static void snd_via82xx_mixer_free_ac97(struct snd_ac97 *ac97)
chip->ac97 = NULL;
}

static struct ac97_quirk ac97_quirks[] = {
static const struct ac97_quirk ac97_quirks[] = {
{
.subvendor = 0x1106,
.subdevice = 0x4161,
Expand Down

0 comments on commit eab0fbf

Please sign in to comment.