diff options
author | Roland Dreier <roland@topspin.com> | 2005-04-16 15:26:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 15:26:32 -0700 |
commit | d10ddbf6d7f6699c386d1f41bf542189de32b6be (patch) | |
tree | b2e3ab95925407472fa9c62bb6016d85f822cb68 /drivers/infiniband/hw/mthca/mthca_dev.h | |
parent | 6bd6228eed52ef188ebe46865ccff72da936c968 (diff) | |
download | linux-d10ddbf6d7f6699c386d1f41bf542189de32b6be.tar.gz linux-d10ddbf6d7f6699c386d1f41bf542189de32b6be.tar.bz2 linux-d10ddbf6d7f6699c386d1f41bf542189de32b6be.zip |
[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) return container_of(ibdev, struct mthca_dev, ib_dev); } +static inline int mthca_is_memfree(struct mthca_dev *dev) +{ + return dev->hca_type == ARBEL_NATIVE; +} + #endif /* MTHCA_DEV_H */ |