/* returns 0, with id set if drive is detected -1, if drive detection failed  */
static int pg_probe(struct pg *dev)
/* returns 0, with id set if drive is detected -1, if drive detection failed  */
static int pg_probe(struct pg *dev)
{
	if (dev->drive == -1) {
		for (dev->drive = 0; dev->drive <= 1; dev->drive++)
			if (!pg_reset(dev))
				return pg_identify(dev, 1);
	} else {
		if (!pg_reset(dev))
			return pg_identify(dev, 1);
	}
	return -1;
}