diff options
author | Roland Dreier <roland@topspin.com> | 2005-04-16 18:26:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:26:32 -0400 |
commit | d10ddbf6d7f6699c386d1f41bf542189de32b6be (patch) | |
tree | b2e3ab95925407472fa9c62bb6016d85f822cb68 /drivers/infiniband/hw/mthca/mthca_memfree.c | |
parent | 6bd6228eed52ef188ebe46865ccff72da936c968 (diff) |
[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_memfree.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_memfree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_memfree.c b/drivers/infiniband/hw/mthca/mthca_memfree.c index ea45de8c5b8e..5824b6d3769f 100644 --- a/drivers/infiniband/hw/mthca/mthca_memfree.c +++ b/drivers/infiniband/hw/mthca/mthca_memfree.c | |||
@@ -472,7 +472,7 @@ int mthca_init_db_tab(struct mthca_dev *dev) | |||
472 | { | 472 | { |
473 | int i; | 473 | int i; |
474 | 474 | ||
475 | if (dev->hca_type != ARBEL_NATIVE) | 475 | if (!mthca_is_memfree(dev)) |
476 | return 0; | 476 | return 0; |
477 | 477 | ||
478 | dev->db_tab = kmalloc(sizeof *dev->db_tab, GFP_KERNEL); | 478 | dev->db_tab = kmalloc(sizeof *dev->db_tab, GFP_KERNEL); |
@@ -504,7 +504,7 @@ void mthca_cleanup_db_tab(struct mthca_dev *dev) | |||
504 | int i; | 504 | int i; |
505 | u8 status; | 505 | u8 status; |
506 | 506 | ||
507 | if (dev->hca_type != ARBEL_NATIVE) | 507 | if (!mthca_is_memfree(dev)) |
508 | return; | 508 | return; |
509 | 509 | ||
510 | /* | 510 | /* |