/* See if we've already got a device in the list.  */
static struct dm_dev_internal* find_device(struct list_head *l, dev_t dev)
/* See if we've already got a device in the list.  */
static struct dm_dev_internal* find_device(struct list_head *l, dev_t dev)
{
	struct dm_dev_internal *dd;
	list_for_each_entry (dd, l, list)
		if (dd->dm_dev.bdev->bd_dev == dev)
			return dd;
	return NULL;
}