class_simple_device_add(ib_ucm_class, IB_UCM_DEV, NULL, "ucm"); 
class_device_create(ib_ucm_class, IB_UCM_DEV, NULL, "ucm"); 
static int __init ib_ucm_init(void){	int result;	result = register_chrdev_region(IB_UCM_DEV, 1, "infiniband_cm");	if (result) {		printk(KERN_ERR "UCM: Error <%d> registering dev\n", result);		goto err_chr;	}	cdev_init(&ib_ucm_cdev, &ib_ucm_fops);	result = cdev_add(&ib_ucm_cdev, IB_UCM_DEV, 1);	if (result) {		printk(KERN_ERR "UCM: Error <%d> adding cdev\n", result);		goto err_cdev;	}	ib_ucm_class = class_simple_create(THIS_MODULE, "infiniband_cm");	if (IS_ERR(ib_ucm_class)) {		result = PTR_ERR(ib_ucm_class);		printk(KERN_ERR "UCM: Error <%d> creating class\n", result);		goto err_class;	}	class_simple_device_add(ib_ucm_class,				IB_UCM_DEV,				NULL,				"ucm");	idr_init(&ctx_id_table);	init_MUTEX(&ctx_id_mutex);	return 0;err_class:	cdev_del(&ib_ucm_cdev);err_cdev:	unregister_chrdev_region(IB_UCM_DEV, 1);err_chr:	return result;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/2d0d099f1950bda2f712364a3bf74f20ddb61190/ucm.c/clean/drivers/infiniband/core/ucm.c