summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mthca/mthca_av.c
diff options
context:
space:
mode:
authorRoland Dreier <roland@topspin.com>2005-04-16 22:26:32 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 22:26:32 (GMT)
commitd10ddbf6d7f6699c386d1f41bf542189de32b6be (patch)
treeb2e3ab95925407472fa9c62bb6016d85f822cb68 /drivers/infiniband/hw/mthca/mthca_av.c
parent6bd6228eed52ef188ebe46865ccff72da936c968 (diff)
downloadlinux-fsl-qoriq-d10ddbf6d7f6699c386d1f41bf542189de32b6be.tar.xz
[PATCH] IB/mthca: encapsulate mem-free check into mthca_is_memfree()
Clean up mem-free mode support by introducing mthca_is_memfree() function, which encapsulates the logic of deciding if a device is mem-free. Signed-off-by: Roland Dreier <roland@topspin.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 e4ee5d0..085baf3 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,
ah->type = MTHCA_AH_PCI_POOL;
- if (dev->hca_type == ARBEL_NATIVE) {
+ if (mthca_is_memfree(dev)) {
ah->av = kmalloc(sizeof *ah->av, GFP_ATOMIC);
if (!ah->av)
return -ENOMEM;
@@ -192,7 +192,7 @@ int __devinit mthca_init_av_table(struct mthca_dev *dev)
{
int err;
- if (dev->hca_type == ARBEL_NATIVE)
+ if (mthca_is_memfree(dev))
return 0;
err = mthca_alloc_init(&dev->av_table.alloc,
@@ -231,7 +231,7 @@ int __devinit mthca_init_av_table(struct mthca_dev *dev)
void __devexit mthca_cleanup_av_table(struct mthca_dev *dev)
{
- if (dev->hca_type == ARBEL_NATIVE)
+ if (mthca_is_memfree(dev))
return;
if (dev->av_table.av_map)