netfilter: xtables: move extension arguments into compound structure (4/6)
[safe/jmp/linux-2.6] / include / linux / i2o.h
index 1fb02e1..75ae6d8 100644 (file)
@@ -18,8 +18,6 @@
 #ifndef _I2O_H
 #define _I2O_H
 
-#ifdef __KERNEL__              /* This file to be included by kernel only */
-
 #include <linux/i2o-dev.h>
 
 /* How many different OSM's are we allowing */
 #include <linux/slab.h>
 #include <linux/workqueue.h>   /* work_struct */
 #include <linux/mempool.h>
+#include <linux/mutex.h>
+#include <linux/scatterlist.h>
+#include <linux/semaphore.h>   /* Needed for MUTEX init macros */
 
 #include <asm/io.h>
-#include <asm/semaphore.h>     /* Needed for MUTEX init macros */
 
 /* message queue empty */
 #define I2O_QUEUE_EMPTY                0xffffffff
@@ -425,7 +425,7 @@ struct i2o_device {
 
        struct device device;
 
-       struct semaphore lock;  /* device lock */
+       struct mutex lock;      /* device lock */
 };
 
 /*
@@ -490,7 +490,7 @@ struct i2o_dma {
  */
 struct i2o_pool {
        char *name;
-       kmem_cache_t *slab;
+       struct kmem_cache *slab;
        mempool_t *mempool;
 };
 
@@ -544,7 +544,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 */
@@ -611,14 +611,9 @@ struct i2o_sys_tbl {
 extern struct list_head i2o_controllers;
 
 /* Message functions */
-static inline struct i2o_message *i2o_msg_get(struct i2o_controller *);
 extern struct i2o_message *i2o_msg_get_wait(struct i2o_controller *, int);
-static inline void i2o_msg_post(struct i2o_controller *, struct i2o_message *);
-static inline int i2o_msg_post_wait(struct i2o_controller *,
-                                   struct i2o_message *, unsigned long);
 extern int i2o_msg_post_wait_mem(struct i2o_controller *, struct i2o_message *,
                                 unsigned long, struct i2o_dma *);
-static inline void i2o_flush_reply(struct i2o_controller *, u32);
 
 /* IOP functions */
 extern int i2o_status_get(struct i2o_controller *);
@@ -763,7 +758,7 @@ static inline dma_addr_t i2o_dma_map_single(struct i2o_controller *c, void *ptr,
        }
 
        dma_addr = dma_map_single(&c->pdev->dev, ptr, size, direction);
-       if (!dma_mapping_error(dma_addr)) {
+       if (!dma_mapping_error(&c->pdev->dev, dma_addr)) {
 #ifdef CONFIG_I2O_EXT_ADAPTEC_DMA64
                if ((sizeof(dma_addr_t) > 4) && c->pae_support) {
                        *mptr++ = cpu_to_le32(0x7C020002);
@@ -836,7 +831,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 +940,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;
 
@@ -986,7 +980,8 @@ extern void i2o_driver_unregister(struct i2o_driver *);
 
 /**
  *     i2o_driver_notify_controller_add - Send notification of added controller
- *                                        to a single I2O driver
+ *     @drv: I2O driver
+ *     @c: I2O controller
  *
  *     Send notification of added controller to a single registered driver.
  */
@@ -998,8 +993,9 @@ static inline void i2o_driver_notify_controller_add(struct i2o_driver *drv,
 };
 
 /**
- *     i2o_driver_notify_controller_remove - Send notification of removed
- *                                           controller to a single I2O driver
+ *     i2o_driver_notify_controller_remove - Send notification of removed controller
+ *     @drv: I2O driver
+ *     @c: I2O controller
  *
  *     Send notification of removed controller to a single registered driver.
  */
@@ -1011,8 +1007,9 @@ static inline void i2o_driver_notify_controller_remove(struct i2o_driver *drv,
 };
 
 /**
- *     i2o_driver_notify_device_add - Send notification of added device to a
- *                                    single I2O driver
+ *     i2o_driver_notify_device_add - Send notification of added device
+ *     @drv: I2O driver
+ *     @i2o_dev: the added i2o_device
  *
  *     Send notification of added device to a single registered driver.
  */
@@ -1025,7 +1022,8 @@ static inline void i2o_driver_notify_device_add(struct i2o_driver *drv,
 
 /**
  *     i2o_driver_notify_device_remove - Send notification of removed device
- *                                       to a single I2O driver
+ *     @drv: I2O driver
+ *     @i2o_dev: the added i2o_device
  *
  *     Send notification of removed device to a single registered driver.
  */
@@ -1148,7 +1146,7 @@ static inline void i2o_msg_post(struct i2o_controller *c,
 /**
  *     i2o_msg_post_wait - Post and wait a message and wait until return
  *     @c: controller
- *     @m: message to post
+ *     @msg: message to post
  *     @timeout: time in seconds to wait
  *
  *     This API allows an OSM to post a message and then be told whether or
@@ -1255,5 +1253,4 @@ extern void i2o_dump_message(struct i2o_message *);
 extern void i2o_dump_hrt(struct i2o_controller *c);
 extern void i2o_debug_state(struct i2o_controller *c);
 
-#endif                         /* __KERNEL__ */
 #endif                         /* _I2O_H */