diff options
Diffstat (limited to 'drivers/message/i2o')
-rw-r--r-- | drivers/message/i2o/debug.c | 31 | ||||
-rw-r--r-- | drivers/message/i2o/exec-osm.c | 21 | ||||
-rw-r--r-- | drivers/message/i2o/i2o_block.c | 7 | ||||
-rw-r--r-- | drivers/message/i2o/i2o_proc.c | 2 |
4 files changed, 34 insertions, 27 deletions
diff --git a/drivers/message/i2o/debug.c b/drivers/message/i2o/debug.c index 40d4ea898dbc..5a6cca8e8c45 100644 --- a/drivers/message/i2o/debug.c +++ b/drivers/message/i2o/debug.c @@ -419,58 +419,53 @@ void i2o_dump_hrt(struct i2o_controller *c) d = (u8 *) (rows + 2); state = p[1] << 8 | p[0]; - printk(KERN_DEBUG "TID %04X:[", state & 0xFFF); + printk("TID %04X:[", state & 0xFFF); state >>= 12; if (state & (1 << 0)) - printk(KERN_DEBUG "H"); /* Hidden */ + printk("H"); /* Hidden */ if (state & (1 << 2)) { - printk(KERN_DEBUG "P"); /* Present */ + printk("P"); /* Present */ if (state & (1 << 1)) - printk(KERN_DEBUG "C"); /* Controlled */ + printk("C"); /* Controlled */ } if (state > 9) - printk(KERN_DEBUG "*"); /* Hard */ + printk("*"); /* Hard */ - printk(KERN_DEBUG "]:"); + printk("]:"); switch (p[3] & 0xFFFF) { case 0: /* Adapter private bus - easy */ - printk(KERN_DEBUG - "Local bus %d: I/O at 0x%04X Mem 0x%08X", p[2], + printk("Local bus %d: I/O at 0x%04X Mem 0x%08X", p[2], d[1] << 8 | d[0], *(u32 *) (d + 4)); break; case 1: /* ISA bus */ - printk(KERN_DEBUG - "ISA %d: CSN %d I/O at 0x%04X Mem 0x%08X", p[2], + printk("ISA %d: CSN %d I/O at 0x%04X Mem 0x%08X", p[2], d[2], d[1] << 8 | d[0], *(u32 *) (d + 4)); break; case 2: /* EISA bus */ - printk(KERN_DEBUG - "EISA %d: Slot %d I/O at 0x%04X Mem 0x%08X", + printk("EISA %d: Slot %d I/O at 0x%04X Mem 0x%08X", p[2], d[3], d[1] << 8 | d[0], *(u32 *) (d + 4)); break; case 3: /* MCA bus */ - printk(KERN_DEBUG - "MCA %d: Slot %d I/O at 0x%04X Mem 0x%08X", p[2], + printk("MCA %d: Slot %d I/O at 0x%04X Mem 0x%08X", p[2], d[3], d[1] << 8 | d[0], *(u32 *) (d + 4)); break; case 4: /* PCI bus */ - printk(KERN_DEBUG - "PCI %d: Bus %d Device %d Function %d", p[2], + printk("PCI %d: Bus %d Device %d Function %d", p[2], d[2], d[1], d[0]); break; case 0x80: /* Other */ default: - printk(KERN_DEBUG "Unsupported bus type."); + printk("Unsupported bus type."); break; } - printk(KERN_DEBUG "\n"); + printk("\n"); rows += length; } } diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index 9bb9859f6dfe..5ea133c59afb 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c @@ -57,6 +57,13 @@ struct i2o_exec_wait { struct list_head list; /* node in global wait list */ }; +/* Work struct needed to handle LCT NOTIFY replies */ +struct i2o_exec_lct_notify_work { + struct work_struct work; /* work struct */ + struct i2o_controller *c; /* controller on which the LCT NOTIFY + was received */ +}; + /* Exec OSM class handling definition */ static struct i2o_class_id i2o_exec_class_id[] = { {I2O_CLASS_EXECUTIVE}, @@ -355,9 +362,12 @@ static int i2o_exec_remove(struct device *dev) * new LCT and if the buffer for the LCT was to small sends a LCT NOTIFY * again, otherwise send LCT NOTIFY to get informed on next LCT change. */ -static void i2o_exec_lct_modified(struct i2o_controller *c) +static void i2o_exec_lct_modified(struct i2o_exec_lct_notify_work *work) { u32 change_ind = 0; + struct i2o_controller *c = work->c; + + kfree(work); if (i2o_device_parse_lct(c) != -EAGAIN) change_ind = c->lct->change_ind + 1; @@ -410,7 +420,7 @@ static int i2o_exec_reply(struct i2o_controller *c, u32 m, return i2o_msg_post_wait_complete(c, m, msg, context); if ((le32_to_cpu(msg->u.head[1]) >> 24) == I2O_CMD_LCT_NOTIFY) { - struct work_struct *work; + struct i2o_exec_lct_notify_work *work; pr_debug("%s: LCT notify received\n", c->name); @@ -418,8 +428,11 @@ static int i2o_exec_reply(struct i2o_controller *c, u32 m, if (!work) return -ENOMEM; - INIT_WORK(work, (void (*)(void *))i2o_exec_lct_modified, c); - queue_work(i2o_exec_driver.event_queue, work); + work->c = c; + + INIT_WORK(&work->work, (void (*)(void *))i2o_exec_lct_modified, + work); + queue_work(i2o_exec_driver.event_queue, &work->work); return 1; } diff --git a/drivers/message/i2o/i2o_block.c b/drivers/message/i2o/i2o_block.c index b09fb6307153..7d4c5497785b 100644 --- a/drivers/message/i2o/i2o_block.c +++ b/drivers/message/i2o/i2o_block.c @@ -1179,10 +1179,9 @@ static int __init i2o_block_init(void) goto exit; } - i2o_blk_req_pool.pool = mempool_create(I2O_BLOCK_REQ_MEMPOOL_SIZE, - mempool_alloc_slab, - mempool_free_slab, - i2o_blk_req_pool.slab); + i2o_blk_req_pool.pool = + mempool_create_slab_pool(I2O_BLOCK_REQ_MEMPOOL_SIZE, + i2o_blk_req_pool.slab); if (!i2o_blk_req_pool.pool) { osm_err("can't init request mempool\n"); rc = -ENOMEM; diff --git a/drivers/message/i2o/i2o_proc.c b/drivers/message/i2o/i2o_proc.c index 2a0c42b8cda5..3d2e76eea93e 100644 --- a/drivers/message/i2o/i2o_proc.c +++ b/drivers/message/i2o/i2o_proc.c @@ -56,7 +56,7 @@ typedef struct _i2o_proc_entry_t { char *name; /* entry name */ mode_t mode; /* mode */ - struct file_operations *fops; /* open function */ + const struct file_operations *fops; /* open function */ } i2o_proc_entry; /* global I2O /proc/i2o entry */ |