/* Scan the alternatives table for a match and return the index into the alternatives table if found, else -1.  */
static int find_alternative(u32 event)
/* Scan the alternatives table for a match and return the index into the alternatives table if found, else -1.  */
static int find_alternative(u32 event)
{
	int i, j;
	for (i = 0; i < ARRAY_SIZE(event_alternatives); ++i) {
		if (event < event_alternatives[i][0])
			break;
		for (j = 0; j < MAX_ALT && event_alternatives[i][j]; ++j)
			if (event == event_alternatives[i][j])
				return i;
	}
	return -1;
}