/* Setting and clearing of dev_get_drvdata(&cdev->dev) is protected by the ccwdev lock  */
static struct urdev* urdev_alloc(struct ccw_device *cdev)
/* Setting and clearing of dev_get_drvdata(&cdev->dev) is protected by the ccwdev lock  */
static struct urdev* urdev_alloc(struct ccw_device *cdev)
{
	struct urdev *urd;
	urd = kzalloc(sizeof(struct urdev), GFP_KERNEL);
	if (!urd)
		return NULL;
	urd->reclen = cdev->id.driver_info;
	ccw_device_get_id(cdev, &urd->dev_id);
	mutex_init(&urd->io_mutex);
	init_waitqueue_head(&urd->wait);
	spin_lock_init(&urd->open_lock);
	atomic_set(&urd->ref_count,  1);
	urd->cdev = cdev;
	get_device(&cdev->dev);
	return urd;
}