/* @drv: Legacy block driver @devnum: Device number (0 = first) @descp: Returns block device descriptor on success  */
static int get_desc(struct blk_driver *drv, int devnum, struct blk_desc **descp)
/* @drv: Legacy block driver @devnum: Device number (0 = first) @descp: Returns block device descriptor on success  */
static int get_desc(struct blk_driver *drv, int devnum, struct blk_desc **descp)
{
	if (drv->desc) {
		if (devnum < 0 || devnum >= drv->max_devs)
			return -ENODEV;
		*descp = &drv->desc[devnum];
		return 0;
	}
	if (!drv->get_dev)
		return -ENOSYS;
	return drv->get_dev(devnum, descp);
}