/* Used by a driver to check whether a VIO device present in the system is in its list of supported devices. Returns the matching vio_device_id structure or NULL if there is no match.  */
static const struct vio_device_id* vio_match_device(const struct vio_device_id *ids, const struct vio_dev *dev)
/* Used by a driver to check whether a VIO device present in the system is in its list of supported devices. Returns the matching vio_device_id structure or NULL if there is no match.  */
static const struct vio_device_id* vio_match_device(const struct vio_device_id *ids, const struct vio_dev *dev)
{
	while (ids->type[0] != '\0') {
		if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) &&
		    of_device_is_compatible(dev->dev.archdata.of_node,
					 ids->compat))
			return ids;
		ids++;
	}
	return NULL;
}