]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/i2o.h
Driver Core: add kobj_attribute handling
[linux-2.6-omap-h63xx.git] / include / linux / i2o.h
index 52f53e2e70c3c2cf6e89e8069f93dddbec24c806..7da5b98d90e6af4724bacbc074221d300e8fafe1 100644 (file)
@@ -31,6 +31,8 @@
 #include <linux/slab.h>
 #include <linux/workqueue.h>   /* work_struct */
 #include <linux/mempool.h>
+#include <linux/mutex.h>
+#include <linux/scatterlist.h>
 
 #include <asm/io.h>
 #include <asm/semaphore.h>     /* Needed for MUTEX init macros */
@@ -425,7 +427,7 @@ struct i2o_device {
 
        struct device device;
 
-       struct semaphore lock;  /* device lock */
+       struct mutex lock;      /* device lock */
 };
 
 /*
@@ -544,7 +546,7 @@ struct i2o_controller {
        struct i2o_dma hrt;     /* HW Resource Table */
        i2o_lct *lct;           /* Logical Config Table */
        struct i2o_dma dlct;    /* Temp LCT */
-       struct semaphore lct_lock;      /* Lock for LCT updates */
+       struct mutex lct_lock;  /* Lock for LCT updates */
        struct i2o_dma status_block;    /* IOP status block */
 
        struct i2o_io base;     /* controller messaging unit */
@@ -836,7 +838,7 @@ static inline int i2o_dma_map_sg(struct i2o_controller *c,
                if ((sizeof(dma_addr_t) > 4) && c->pae_support)
                        *mptr++ = cpu_to_le32(i2o_dma_high(sg_dma_address(sg)));
 #endif
-               sg++;
+               sg = sg_next(sg);
        }
        *sg_ptr = mptr;
 
@@ -945,8 +947,7 @@ static inline int i2o_pool_alloc(struct i2o_pool *pool, const char *name,
        strcpy(pool->name, name);
 
        pool->slab =
-           kmem_cache_create(pool->name, size, 0, SLAB_HWCACHE_ALIGN, NULL,
-                             NULL);
+           kmem_cache_create(pool->name, size, 0, SLAB_HWCACHE_ALIGN, NULL);
        if (!pool->slab)
                goto free_name;