]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/infiniband/hw/ehca/ehca_cq.c
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
[linux-2.6-omap-h63xx.git] / drivers / infiniband / hw / ehca / ehca_cq.c
index 33647a95eb9a03f1ff5a47c760fb6d3fc5c2d483..2f4c28a30271694f0d62c5add9b625716e027e4c 100644 (file)
@@ -132,9 +132,9 @@ struct ib_cq *ehca_create_cq(struct ib_device *device, int cqe, int comp_vector,
        if (cqe >= 0xFFFFFFFF - 64 - additional_cqe)
                return ERR_PTR(-EINVAL);
 
-       if (!atomic_add_unless(&shca->num_cqs, 1, ehca_max_cq)) {
+       if (!atomic_add_unless(&shca->num_cqs, 1, shca->max_num_cqs)) {
                ehca_err(device, "Unable to create CQ, max number of %i "
-                       "CQs reached.", ehca_max_cq);
+                       "CQs reached.", shca->max_num_cqs);
                ehca_err(device, "To increase the maximum number of CQs "
                        "use the number_of_cqs module parameter.\n");
                return ERR_PTR(-ENOSPC);