Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[linux-2.6-block.git] / drivers / infiniband / hw / cxgb4 / device.c
index d499cd61c0e89f659f555501b27484b3e2bc6df4..c79cf63fb0bb8dac92d342fda989b9c42315bdbe 100644 (file)
@@ -720,11 +720,8 @@ static const struct file_operations ep_debugfs_fops = {
        .read    = debugfs_read,
 };
 
-static int setup_debugfs(struct c4iw_dev *devp)
+static void setup_debugfs(struct c4iw_dev *devp)
 {
-       if (!devp->debugfs_root)
-               return -1;
-
        debugfs_create_file_size("qps", S_IWUSR, devp->debugfs_root,
                                 (void *)devp, &qp_debugfs_fops, 4096);
 
@@ -740,7 +737,6 @@ static int setup_debugfs(struct c4iw_dev *devp)
        if (c4iw_wr_log)
                debugfs_create_file_size("wr_log", S_IWUSR, devp->debugfs_root,
                                         (void *)devp, &wr_log_debugfs_fops, 4096);
-       return 0;
 }
 
 void c4iw_release_dev_ucontext(struct c4iw_rdev *rdev,
@@ -981,7 +977,7 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
                pr_info("%s: On-Chip Queues not supported on this device\n",
                        pci_name(infop->pdev));
 
-       devp = (struct c4iw_dev *)ib_alloc_device(sizeof(*devp));
+       devp = ib_alloc_device(c4iw_dev, ibdev);
        if (!devp) {
                pr_err("Cannot allocate ib device\n");
                return ERR_PTR(-ENOMEM);
@@ -1564,8 +1560,6 @@ static int __init c4iw_init_module(void)
                return err;
 
        c4iw_debugfs_root = debugfs_create_dir(DRV_NAME, NULL);
-       if (!c4iw_debugfs_root)
-               pr_warn("could not create debugfs entry, continuing\n");
 
        reg_workq = create_singlethread_workqueue("Register_iWARP_device");
        if (!reg_workq) {