Merge branch 'origin'
[pandora-kernel.git] / drivers / infiniband / hw / mthca / mthca_memfree.h
index 29433f2..36f1141 100644 (file)
@@ -39,8 +39,7 @@
 
 #include <linux/list.h>
 #include <linux/pci.h>
-
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
 
 #define MTHCA_ICM_CHUNK_LEN \
        ((256 - sizeof (struct list_head) - 2 * sizeof (int)) /         \
@@ -64,7 +63,7 @@ struct mthca_icm_table {
        int               num_obj;
        int               obj_size;
        int               lowmem;
-       struct semaphore  mutex;
+       struct mutex      mutex;
        struct mthca_icm *icm[0];
 };
 
@@ -147,7 +146,7 @@ struct mthca_db_table {
        int                   max_group1;
        int                   min_group2;
        struct mthca_db_page *page;
-       struct semaphore      mutex;
+       struct mutex          mutex;
 };
 
 enum mthca_db_type {
@@ -173,7 +172,8 @@ void mthca_cleanup_user_db_tab(struct mthca_dev *dev, struct mthca_uar *uar,
 
 int mthca_init_db_tab(struct mthca_dev *dev);
 void mthca_cleanup_db_tab(struct mthca_dev *dev);
-int mthca_alloc_db(struct mthca_dev *dev, int type, u32 qn, __be32 **db);
+int mthca_alloc_db(struct mthca_dev *dev, enum mthca_db_type type,
+                  u32 qn, __be32 **db);
 void mthca_free_db(struct mthca_dev *dev, int type, int db_index);
 
 #endif /* MTHCA_MEMFREE_H */