/* This function searches all devices owned by @cdrv for a device with a bus id matching @bus_id. Returns: If a match is found, its reference count of the found device is increased and it is returned; else NULL is returned.  */
struct ccw_device* get_ccwdev_by_busid(struct ccw_driver *cdrv, const char *bus_id)
/* This function searches all devices owned by @cdrv for a device with a bus id matching @bus_id. Returns: If a match is found, its reference count of the found device is increased and it is returned; else NULL is returned.  */
struct ccw_device* get_ccwdev_by_busid(struct ccw_driver *cdrv, const char *bus_id)
{
	struct device *dev;
	struct device_driver *drv;
	drv = get_driver(&cdrv->driver);
	if (!drv)
		return NULL;
	dev = driver_find_device(drv, NULL, (void *)bus_id,
				 __ccwdev_check_busid);
	put_driver(drv);
	return dev ? to_ccwdev(dev) : NULL;
}