dev->ib_dev.owner                = THIS_MODULE;  
int mthca_register_device(struct mthca_dev *dev){	int ret;	int i;	strlcpy(dev->ib_dev.name, "mthca%d", IB_DEVICE_NAME_MAX);	dev->ib_dev.node_type            = IB_NODE_CA;	dev->ib_dev.phys_port_cnt        = dev->limits.num_ports;	dev->ib_dev.dma_device           = &dev->pdev->dev;	dev->ib_dev.class_dev.dev        = &dev->pdev->dev;	dev->ib_dev.query_device         = mthca_query_device;	dev->ib_dev.query_port           = mthca_query_port;	dev->ib_dev.modify_port          = mthca_modify_port;	dev->ib_dev.query_pkey           = mthca_query_pkey;	dev->ib_dev.query_gid            = mthca_query_gid;	dev->ib_dev.alloc_pd             = mthca_alloc_pd;	dev->ib_dev.dealloc_pd           = mthca_dealloc_pd;	dev->ib_dev.create_ah            = mthca_ah_create;	dev->ib_dev.destroy_ah           = mthca_ah_destroy;	dev->ib_dev.create_qp            = mthca_create_qp;	dev->ib_dev.modify_qp            = mthca_modify_qp;	dev->ib_dev.destroy_qp           = mthca_destroy_qp;	dev->ib_dev.create_cq            = mthca_create_cq;	dev->ib_dev.destroy_cq           = mthca_destroy_cq;	dev->ib_dev.poll_cq              = mthca_poll_cq;	dev->ib_dev.get_dma_mr           = mthca_get_dma_mr;	dev->ib_dev.reg_phys_mr          = mthca_reg_phys_mr;	dev->ib_dev.dereg_mr             = mthca_dereg_mr;	if (dev->mthca_flags & MTHCA_FLAG_FMR) {		dev->ib_dev.alloc_fmr            = mthca_alloc_fmr;		dev->ib_dev.unmap_fmr            = mthca_unmap_fmr;		dev->ib_dev.dealloc_fmr          = mthca_dealloc_fmr;		if (mthca_is_memfree(dev))			dev->ib_dev.map_phys_fmr = mthca_arbel_map_phys_fmr;		else			dev->ib_dev.map_phys_fmr = mthca_tavor_map_phys_fmr;	}	dev->ib_dev.attach_mcast         = mthca_multicast_attach;	dev->ib_dev.detach_mcast         = mthca_multicast_detach;	dev->ib_dev.process_mad          = mthca_process_mad;	if (mthca_is_memfree(dev)) {		dev->ib_dev.req_notify_cq = mthca_arbel_arm_cq;		dev->ib_dev.post_send     = mthca_arbel_post_send;		dev->ib_dev.post_recv     = mthca_arbel_post_receive;	} else {		dev->ib_dev.req_notify_cq = mthca_tavor_arm_cq;		dev->ib_dev.post_send     = mthca_tavor_post_send;		dev->ib_dev.post_recv     = mthca_tavor_post_receive;	}	init_MUTEX(&dev->cap_mask_mutex);	ret = ib_register_device(&dev->ib_dev);	if (ret)		return ret;	for (i = 0; i < ARRAY_SIZE(mthca_class_attributes); ++i) {		ret = class_device_create_file(&dev->ib_dev.class_dev,					       mthca_class_attributes[i]);		if (ret) {			ib_unregister_device(&dev->ib_dev);			return ret;		}	}	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1cf296b66afeec2edc39cc7bbedbf3d0afd2a373/mthca_provider.c/clean/drivers/infiniband/hw/mthca/mthca_provider.c