/* Used by a driver to check whether a TC device present in the system is in its list of supported devices. Returns the matching tc_device_id structure or NULL if there is no match.  */
const struct tc_device_id* tc_match_device(struct tc_driver *tdrv, struct tc_dev *tdev)
/* Used by a driver to check whether a TC device present in the system is in its list of supported devices. Returns the matching tc_device_id structure or NULL if there is no match.  */
const struct tc_device_id* tc_match_device(struct tc_driver *tdrv, struct tc_dev *tdev)
{
	const struct tc_device_id *id = tdrv->id_table;
	if (id) {
		while (id->name[0] || id->vendor[0]) {
			if (strcmp(tdev->name, id->name) == 0 &&
			    strcmp(tdev->vendor, id->vendor) == 0)
				return id;
			id++;
		}
	}
	return NULL;
}