if ((q = blk_init_queue(ub_bd_rq_fn, &sc->lock)) == NULL) 
if ((q = blk_init_queue(ub_request_fn, &sc->lock)) == NULL) 
static int ub_probe_lun(struct ub_dev *sc, int lnum){	struct ub_lun *lun;	request_queue_t *q;	struct gendisk *disk;	int rc;	rc = -ENOMEM;	if ((lun = kmalloc(sizeof(struct ub_lun), GFP_KERNEL)) == NULL)		goto err_alloc;	memset(lun, 0, sizeof(struct ub_lun));	lun->num = lnum;	rc = -ENOSR;	if ((lun->id = ub_id_get()) == -1)		goto err_id;	lun->udev = sc;	list_add(&lun->link, &sc->luns);	snprintf(lun->name, 16, DRV_NAME "%c(%d.%d.%d)",	    lun->id + 'a', sc->dev->bus->busnum, sc->dev->devnum, lun->num);	lun->removable = 1;		/* XXX Query this from the device */	lun->changed = 1;		/* ub_revalidate clears only */	lun->first_open = 1;	ub_revalidate(sc, lun);	rc = -ENOMEM;	if ((disk = alloc_disk(UB_MINORS_PER_MAJOR)) == NULL)		goto err_diskalloc;	lun->disk = disk;	sprintf(disk->disk_name, DRV_NAME "%c", lun->id + 'a');	sprintf(disk->devfs_name, DEVFS_NAME "/%c", lun->id + 'a');	disk->major = UB_MAJOR;	disk->first_minor = lun->id * UB_MINORS_PER_MAJOR;	disk->fops = &ub_bd_fops;	disk->private_data = lun;	disk->driverfs_dev = &sc->intf->dev;	/* XXX Many to one ok? */	rc = -ENOMEM;	if ((q = blk_init_queue(ub_bd_rq_fn, &sc->lock)) == NULL)		goto err_blkqinit;	disk->queue = q;	blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);	blk_queue_max_hw_segments(q, UB_MAX_REQ_SG);	blk_queue_max_phys_segments(q, UB_MAX_REQ_SG);	blk_queue_segment_boundary(q, 0xffffffff);	/* Dubious. */	blk_queue_max_sectors(q, UB_MAX_SECTORS);	blk_queue_hardsect_size(q, lun->capacity.bsize);	q->queuedata = lun;	set_capacity(disk, lun->capacity.nsec);	if (lun->removable)		disk->flags |= GENHD_FL_REMOVABLE;	add_disk(disk);	return 0;err_blkqinit:	put_disk(disk);err_diskalloc:	list_del(&lun->link);	ub_id_put(lun->id);err_id:	kfree(lun);err_alloc:	return rc;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/6c1eb8c1c3ec2df00b629ab4fe7fe04a95129f08/ub.c/buggy/drivers/block/ub.c