aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_av.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_av.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_av.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c
index e4ee5d024dfb..085baf393ca4 100644
--- a/drivers/infiniband/hw/mthca/mthca_av.c
+++ b/drivers/infiniband/hw/mthca/mthca_av.c
@@ -62,7 +62,7 @@ int mthca_create_ah(struct mthca_dev *dev,
62 62
63 ah->type = MTHCA_AH_PCI_POOL; 63 ah->type = MTHCA_AH_PCI_POOL;
64 64
65 if (dev->hca_type == ARBEL_NATIVE) { 65 if (mthca_is_memfree(dev)) {
66 ah->av = kmalloc(sizeof *ah->av, GFP_ATOMIC); 66 ah->av = kmalloc(sizeof *ah->av, GFP_ATOMIC);
67 if (!ah->av) 67 if (!ah->av)
68 return -ENOMEM; 68 return -ENOMEM;
@@ -192,7 +192,7 @@ int __devinit mthca_init_av_table(struct mthca_dev *dev)
192{ 192{
193 int err; 193 int err;
194 194
195 if (dev->hca_type == ARBEL_NATIVE) 195 if (mthca_is_memfree(dev))
196 return 0; 196 return 0;
197 197
198 err = mthca_alloc_init(&dev->av_table.alloc, 198 err = mthca_alloc_init(&dev->av_table.alloc,
@@ -231,7 +231,7 @@ int __devinit mthca_init_av_table(struct mthca_dev *dev)
231 231
232void __devexit mthca_cleanup_av_table(struct mthca_dev *dev) 232void __devexit mthca_cleanup_av_table(struct mthca_dev *dev)
233{ 233{
234 if (dev->hca_type == ARBEL_NATIVE) 234 if (mthca_is_memfree(dev))
235 return; 235 return;
236 236
237 if (dev->av_table.av_map) 237 if (dev->av_table.av_map)