aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-08 06:42:08 -0400
committerTakashi Iwai <tiwai@suse.de>2009-07-08 06:42:08 -0400
commit277a57c710ff73af1213f5d4b42bf6458c1ebca3 (patch)
tree303352bdc9240d2d21918545b66092b92b13b502 /sound
parentb4dabfc452a1011882983db9e464f8ee1e3c01e6 (diff)
ALSA: hda - Fix compile warnings in patch_cirrus.c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_cirrus.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sound/pci/hda/patch_cirrus.c b/sound/pci/hda/patch_cirrus.c
index 54a7dc8345a7..57251d72b124 100644
--- a/sound/pci/hda/patch_cirrus.c
+++ b/sound/pci/hda/patch_cirrus.c
@@ -110,7 +110,7 @@ enum {
110/* 0x0015 - visibility reg */ 110/* 0x0015 - visibility reg */
111 111
112 112
113static int cs_vendor_coef_get(struct hda_codec *codec, unsigned int idx) 113static inline int cs_vendor_coef_get(struct hda_codec *codec, unsigned int idx)
114{ 114{
115 snd_hda_codec_write(codec, CS420X_VENDOR_NID, 0, 115 snd_hda_codec_write(codec, CS420X_VENDOR_NID, 0,
116 AC_VERB_SET_COEF_INDEX, idx); 116 AC_VERB_SET_COEF_INDEX, idx);
@@ -118,8 +118,8 @@ static int cs_vendor_coef_get(struct hda_codec *codec, unsigned int idx)
118 AC_VERB_GET_PROC_COEF, 0); 118 AC_VERB_GET_PROC_COEF, 0);
119} 119}
120 120
121static void cs_vendor_coef_set(struct hda_codec *codec, unsigned int idx, 121static inline void cs_vendor_coef_set(struct hda_codec *codec, unsigned int idx,
122 unsigned int coef) 122 unsigned int coef)
123{ 123{
124 snd_hda_codec_write(codec, CS420X_VENDOR_NID, 0, 124 snd_hda_codec_write(codec, CS420X_VENDOR_NID, 0,
125 AC_VERB_SET_COEF_INDEX, idx); 125 AC_VERB_SET_COEF_INDEX, idx);
@@ -367,7 +367,6 @@ static hda_nid_t get_adc(struct hda_codec *codec, hda_nid_t pin,
367 367
368static int is_active_pin(struct hda_codec *codec, hda_nid_t nid) 368static int is_active_pin(struct hda_codec *codec, hda_nid_t nid)
369{ 369{
370 struct cs_spec *spec = codec->spec;
371 unsigned int val; 370 unsigned int val;
372 val = snd_hda_codec_get_pincfg(codec, nid); 371 val = snd_hda_codec_get_pincfg(codec, nid);
373 return (get_defcfg_connect(val) != AC_JACK_PORT_NONE); 372 return (get_defcfg_connect(val) != AC_JACK_PORT_NONE);
@@ -377,7 +376,7 @@ static int parse_output(struct hda_codec *codec)
377{ 376{
378 struct cs_spec *spec = codec->spec; 377 struct cs_spec *spec = codec->spec;
379 struct auto_pin_cfg *cfg = &spec->autocfg; 378 struct auto_pin_cfg *cfg = &spec->autocfg;
380 int i, err, extra_nids; 379 int i, extra_nids;
381 hda_nid_t dac; 380 hda_nid_t dac;
382 381
383 for (i = 0; i < cfg->line_outs; i++) { 382 for (i = 0; i < cfg->line_outs; i++) {
@@ -422,11 +421,10 @@ static int parse_input(struct hda_codec *codec)
422{ 421{
423 struct cs_spec *spec = codec->spec; 422 struct cs_spec *spec = codec->spec;
424 struct auto_pin_cfg *cfg = &spec->autocfg; 423 struct auto_pin_cfg *cfg = &spec->autocfg;
425 int i, n, err; 424 int i;
426 425
427 for (i = 0; i < AUTO_PIN_LAST; i++) { 426 for (i = 0; i < AUTO_PIN_LAST; i++) {
428 hda_nid_t pin = cfg->input_pins[i]; 427 hda_nid_t pin = cfg->input_pins[i];
429 struct snd_kcontrol *kctl;
430 if (!pin) 428 if (!pin)
431 continue; 429 continue;
432 spec->input_idx[spec->num_inputs] = i; 430 spec->input_idx[spec->num_inputs] = i;
@@ -461,7 +459,6 @@ static int parse_digital_output(struct hda_codec *codec)
461 struct cs_spec *spec = codec->spec; 459 struct cs_spec *spec = codec->spec;
462 struct auto_pin_cfg *cfg = &spec->autocfg; 460 struct auto_pin_cfg *cfg = &spec->autocfg;
463 hda_nid_t nid; 461 hda_nid_t nid;
464 int err;
465 462
466 if (!cfg->dig_outs) 463 if (!cfg->dig_outs)
467 return 0; 464 return 0;
@@ -651,7 +648,6 @@ static int change_cur_input(struct hda_codec *codec, unsigned int idx,
651 int force) 648 int force)
652{ 649{
653 struct cs_spec *spec = codec->spec; 650 struct cs_spec *spec = codec->spec;
654 struct auto_pin_cfg *cfg = &spec->autocfg;
655 651
656 if (spec->cur_input == idx && !force) 652 if (spec->cur_input == idx && !force)
657 return 0; 653 return 0;
@@ -1003,7 +999,6 @@ static int cs_init(struct hda_codec *codec)
1003 999
1004static int cs_build_controls(struct hda_codec *codec) 1000static int cs_build_controls(struct hda_codec *codec)
1005{ 1001{
1006 struct cs_spec *spec = codec->spec;
1007 int err; 1002 int err;
1008 1003
1009 err = build_output(codec); 1004 err = build_output(codec);