/* Requests ownership of a doorbell message range. Returns a resource if the request has been satisfied or NULL on failure.  */
struct resource* rio_request_outb_dbell(struct rio_dev *rdev, u16 start, u16 end)
/* Requests ownership of a doorbell message range. Returns a resource if the request has been satisfied or NULL on failure.  */
struct resource* rio_request_outb_dbell(struct rio_dev *rdev, u16 start, u16 end)
{
	struct resource *res = kmalloc(sizeof(struct resource), GFP_KERNEL);
	if (res) {
		rio_init_dbell_res(res, start, end);
		if (request_resource(&rdev->riores[RIO_DOORBELL_RESOURCE], res)
		    < 0) {
			kfree(res);
			res = NULL;
		}
	}
	return res;
}