/* Search config entry number matched in sync_table from given target and speed period value. If failed to search, return negative value.  */
static int nsp32_search_period_entry(nsp32_hw_data *, nsp32_target *, unsigned char)
/* Search config entry number matched in sync_table from given target and speed period value. If failed to search, return negative value.  */
static int nsp32_search_period_entry(nsp32_hw_data *, nsp32_target *, unsigned char)
{
	int i;
	if (target->limit_entry >= data->syncnum) {
		nsp32_msg(KERN_ERR, "limit_entry exceeds syncnum!");
		target->limit_entry = 0;
	}
	for (i = target->limit_entry; i < data->syncnum; i++) {
		if (period >= data->synct[i].start_period &&
		    period <= data->synct[i].end_period) {
				break;
		}
	}
	if (i == data->syncnum) {
		i = -1;
	}
	return i;
}