/* Return codes: instance - a unique integer ID allocated as the new instance. -1 - lpfc get instance failed.  */
int lpfc_get_instance(void)
/* Return codes: instance - a unique integer ID allocated as the new instance. -1 - lpfc get instance failed.  */
int lpfc_get_instance(void)
{
	int instance = 0;
	if (!idr_pre_get(&lpfc_hba_index, GFP_KERNEL))
		return -1;
	if (idr_get_new(&lpfc_hba_index, NULL, &instance))
		return -1;
	return instance;
}