/* have data return 1, however return 0 if we have nothing  */
static int timeriomem_rng_data_present(struct hwrng *rng, int wait)
/* have data return 1, however return 0 if we have nothing  */
static int timeriomem_rng_data_present(struct hwrng *rng, int wait)
{
	if (rng->priv == 0)
		return 1;
	if (!wait || timeriomem_rng_data->present)
		return timeriomem_rng_data->present;
	wait_for_completion(&timeriomem_rng_data->completion);
	return 1;
}