27 May
2009
27 May
'09
9:20 a.m.
At Mon, 25 May 2009 19:18:44 +0000, Nickolas Lloyd wrote:
- nid = cfg->input_pins[AUTO_PIN_MIC];
- idx = 0;
+again:
- if (nid) {
if (err < 0) return err;err = stac92xx_add_mic_jack_control(codec, nid, idx);
else if (!err)
idx++;
- }
- if (nid == cfg->input_pins[AUTO_PIN_MIC]) {
nid = cfg->input_pins[AUTO_PIN_FRONT_MIC];
}goto again;
Well, a goto loop is old-fashioned as a code in 21st century :)
Also, it might be better to use auto_pin_cfg_labels[] to each unique control name instead of index. It's often more intuitive.
Takashi