/* Return value: pointer to SES table entry / NULL on failure  */
static const struct ipr_ses_table_entry* ipr_find_ses_entry(struct ipr_resource_entry *res)
/* Return value: pointer to SES table entry / NULL on failure  */
static const struct ipr_ses_table_entry* ipr_find_ses_entry(struct ipr_resource_entry *res)
{
	int i, j, matches;
	const struct ipr_ses_table_entry *ste = ipr_ses_table;
	for (i = 0; i < ARRAY_SIZE(ipr_ses_table); i++, ste++) {
		for (j = 0, matches = 0; j < IPR_PROD_ID_LEN; j++) {
			if (ste->compare_product_id_byte[j] == 'X') {
				if (res->cfgte.std_inq_data.vpids.product_id[j] == ste->product_id[j])
					matches++;
				else
					break;
			} else
				matches++;
		}
		if (matches == IPR_PROD_ID_LEN)
			return ste;
	}
	return NULL;
}