aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorHarald Welte <HaraldWelte@viatech.com>2008-09-09 03:40:38 -0400
committerJaroslav Kysela <perex@perex.cz>2008-09-09 12:51:58 -0400
commiteb14a46cf974c59aadef8c120b7dfcb27bc81f24 (patch)
tree0a87e805d6e3db6b5bb3f7f23fa9da994a0fedad /sound/pci/hda
parente8f18ae558b30783c2c0f6df32626fbc789ba6f6 (diff)
ALSA: HDA patch_via.c: cleanup
* add extra parenthesis to make code more readable * use kzalloc() for alloc+zero rather than kcalloc() * ensure that AUTO_SEQ_* starts at 0 Signed-off-by: Harald Welte <HaraldWelte@viatech.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/patch_via.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index e7e43524f8c7..3e148373334d 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -77,7 +77,7 @@ enum {
77}; 77};
78 78
79enum { 79enum {
80 AUTO_SEQ_FRONT, 80 AUTO_SEQ_FRONT = 0,
81 AUTO_SEQ_SURROUND, 81 AUTO_SEQ_SURROUND,
82 AUTO_SEQ_CENLFE, 82 AUTO_SEQ_CENLFE,
83 AUTO_SEQ_SIDE 83 AUTO_SEQ_SIDE
@@ -283,11 +283,11 @@ static int via_mux_enum_put(struct snd_kcontrol *kcontrol,
283 return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, 283 return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,
284 0x18, &spec->cur_mux[adc_idx]); 284 0x18, &spec->cur_mux[adc_idx]);
285 else if ((IS_VT1709_10CH_VENDORID(vendor_id) || 285 else if ((IS_VT1709_10CH_VENDORID(vendor_id) ||
286 IS_VT1709_6CH_VENDORID(vendor_id)) && adc_idx == 0) 286 IS_VT1709_6CH_VENDORID(vendor_id)) && (adc_idx == 0))
287 return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, 287 return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,
288 0x19, &spec->cur_mux[adc_idx]); 288 0x19, &spec->cur_mux[adc_idx]);
289 else if ((IS_VT1708B_8CH_VENDORID(vendor_id) || 289 else if ((IS_VT1708B_8CH_VENDORID(vendor_id) ||
290 IS_VT1708B_4CH_VENDORID(vendor_id)) && adc_idx == 0) 290 IS_VT1708B_4CH_VENDORID(vendor_id)) && (adc_idx == 0))
291 return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol, 291 return snd_hda_input_mux_put(codec, spec->input_mux, ucontrol,
292 0x17, &spec->cur_mux[adc_idx]); 292 0x17, &spec->cur_mux[adc_idx]);
293 else 293 else
@@ -897,7 +897,7 @@ static int patch_vt1708(struct hda_codec *codec)
897 int err; 897 int err;
898 898
899 /* create a codec specific record */ 899 /* create a codec specific record */
900 spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); 900 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
901 if (spec == NULL) 901 if (spec == NULL)
902 return -ENOMEM; 902 return -ENOMEM;
903 903
@@ -1360,7 +1360,7 @@ static int patch_vt1709_10ch(struct hda_codec *codec)
1360 int err; 1360 int err;
1361 1361
1362 /* create a codec specific record */ 1362 /* create a codec specific record */
1363 spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); 1363 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
1364 if (spec == NULL) 1364 if (spec == NULL)
1365 return -ENOMEM; 1365 return -ENOMEM;
1366 1366
@@ -1451,7 +1451,7 @@ static int patch_vt1709_6ch(struct hda_codec *codec)
1451 int err; 1451 int err;
1452 1452
1453 /* create a codec specific record */ 1453 /* create a codec specific record */
1454 spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); 1454 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
1455 if (spec == NULL) 1455 if (spec == NULL)
1456 return -ENOMEM; 1456 return -ENOMEM;
1457 1457
@@ -1890,7 +1890,7 @@ static int patch_vt1708B_8ch(struct hda_codec *codec)
1890 int err; 1890 int err;
1891 1891
1892 /* create a codec specific record */ 1892 /* create a codec specific record */
1893 spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); 1893 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
1894 if (spec == NULL) 1894 if (spec == NULL)
1895 return -ENOMEM; 1895 return -ENOMEM;
1896 1896
@@ -1939,7 +1939,7 @@ static int patch_vt1708B_4ch(struct hda_codec *codec)
1939 int err; 1939 int err;
1940 1940
1941 /* create a codec specific record */ 1941 /* create a codec specific record */
1942 spec = kcalloc(1, sizeof(*spec), GFP_KERNEL); 1942 spec = kzalloc(sizeof(*spec), GFP_KERNEL);
1943 if (spec == NULL) 1943 if (spec == NULL)
1944 return -ENOMEM; 1944 return -ENOMEM;
1945 1945