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_dev.h | |
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_dev.h')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_dev.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_dev.h b/drivers/infiniband/hw/mthca/mthca_dev.h index cca3ca7196a3..616a0de54b40 100644 --- a/drivers/infiniband/hw/mthca/mthca_dev.h +++ b/drivers/infiniband/hw/mthca/mthca_dev.h | |||
@@ -470,4 +470,9 @@ static inline struct mthca_dev *to_mdev(struct ib_device *ibdev) | |||
470 | return container_of(ibdev, struct mthca_dev, ib_dev); | 470 | return container_of(ibdev, struct mthca_dev, ib_dev); |
471 | } | 471 | } |
472 | 472 | ||
473 | static inline int mthca_is_memfree(struct mthca_dev *dev) | ||
474 | { | ||
475 | return dev->hca_type == ARBEL_NATIVE; | ||
476 | } | ||
477 | |||
473 | #endif /* MTHCA_DEV_H */ | 478 | #endif /* MTHCA_DEV_H */ |