/* Sort an associated group of pins according to their sequence numbers.  */
static void sort_pins_by_sequence(hda_nid_t *pins, short *sequences, int num_pins)
/* Sort an associated group of pins according to their sequence numbers.  */
static void sort_pins_by_sequence(hda_nid_t *pins, short *sequences, int num_pins)
{
	int i, j;
	short seq;
	hda_nid_t nid;
	for (i = 0; i < num_pins; i++) {
		for (j = i + 1; j < num_pins; j++) {
			if (sequences[i] > sequences[j]) {
				seq = sequences[i];
				sequences[i] = sequences[j];
				sequences[j] = seq;
				nid = pins[i];
				pins[i] = pins[j];
				pins[j] = nid;
			}
		}
	}
}