summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca/mthca_dev.h
diff options
context:
space:
mode:
authorRoland Dreier <roland@topspin.com>2005-04-16 15:26:32 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:26:32 -0700
commitd10ddbf6d7f6699c386d1f41bf542189de32b6be (patch)
treeb2e3ab95925407472fa9c62bb6016d85f822cb68 /drivers/infiniband/hw/mthca/mthca_dev.h
parent6bd6228eed52ef188ebe46865ccff72da936c968 (diff)
downloadop-kernel-dev-d10ddbf6d7f6699c386d1f41bf542189de32b6be.zip
op-kernel-dev-d10ddbf6d7f6699c386d1f41bf542189de32b6be.tar.gz
[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.h5
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 cca3ca7..616a0de 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 */
OpenPOWER on IntegriCloud