/* Finds the first unused PBA in a zone Returns the absolute PBA of an unused PBA, or 0 if none found.  */
static u16 alauda_find_unused_pba(struct alauda_media_info *info, unsigned int zone)
/* Finds the first unused PBA in a zone Returns the absolute PBA of an unused PBA, or 0 if none found.  */
static u16 alauda_find_unused_pba(struct alauda_media_info *info, unsigned int zone)
{
	u16 *pba_to_lba = info->pba_to_lba[zone];
	unsigned int i;
	for (i = 0; i < info->zonesize; i++)
		if (pba_to_lba[i] == UNDEF)
			return (zone << info->zoneshift) + i;
	return 0;
}