/* Used by a driver to check whether a DIO device present in the system is in its list of supported devices. Returns the matching dio_device_id structure or NULL if there is no match.  */
static int dio_bus_match(struct device *dev, struct device_driver *drv)
/* Used by a driver to check whether a DIO device present in the system is in its list of supported devices. Returns the matching dio_device_id structure or NULL if there is no match.  */
static int dio_bus_match(struct device *dev, struct device_driver *drv)
{
	struct dio_dev *d = to_dio_dev(dev);
	struct dio_driver *dio_drv = to_dio_driver(drv);
	const struct dio_device_id *ids = dio_drv->id_table;
	if (!ids)
		return 0;
	return dio_match_device(ids, d) ? 1 : 0;
}