diff options
Diffstat (limited to 'drivers/message/i2o/exec-osm.c')
-rw-r--r-- | drivers/message/i2o/exec-osm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/message/i2o/exec-osm.c b/drivers/message/i2o/exec-osm.c index 71a09332e7c0..d24548f4c033 100644 --- a/drivers/message/i2o/exec-osm.c +++ b/drivers/message/i2o/exec-osm.c | |||
@@ -77,7 +77,7 @@ static struct i2o_exec_wait *i2o_exec_wait_alloc(void) | |||
77 | 77 | ||
78 | wait = kmalloc(sizeof(*wait), GFP_KERNEL); | 78 | wait = kmalloc(sizeof(*wait), GFP_KERNEL); |
79 | if (!wait) | 79 | if (!wait) |
80 | return ERR_PTR(-ENOMEM); | 80 | return NULL; |
81 | 81 | ||
82 | memset(wait, 0, sizeof(*wait)); | 82 | memset(wait, 0, sizeof(*wait)); |
83 | 83 | ||
@@ -271,8 +271,8 @@ static ssize_t i2o_exec_show_vendor_id(struct device *d, | |||
271 | struct i2o_device *dev = to_i2o_device(d); | 271 | struct i2o_device *dev = to_i2o_device(d); |
272 | u16 id; | 272 | u16 id; |
273 | 273 | ||
274 | if (i2o_parm_field_get(dev, 0x0000, 0, &id, 2)) { | 274 | if (!i2o_parm_field_get(dev, 0x0000, 0, &id, 2)) { |
275 | sprintf(buf, "0x%04x", id); | 275 | sprintf(buf, "0x%04x", le16_to_cpu(id)); |
276 | return strlen(buf) + 1; | 276 | return strlen(buf) + 1; |
277 | } | 277 | } |
278 | 278 | ||
@@ -293,8 +293,8 @@ static ssize_t i2o_exec_show_product_id(struct device *d, | |||
293 | struct i2o_device *dev = to_i2o_device(d); | 293 | struct i2o_device *dev = to_i2o_device(d); |
294 | u16 id; | 294 | u16 id; |
295 | 295 | ||
296 | if (i2o_parm_field_get(dev, 0x0000, 1, &id, 2)) { | 296 | if (!i2o_parm_field_get(dev, 0x0000, 1, &id, 2)) { |
297 | sprintf(buf, "0x%04x", id); | 297 | sprintf(buf, "0x%04x", le16_to_cpu(id)); |
298 | return strlen(buf) + 1; | 298 | return strlen(buf) + 1; |
299 | } | 299 | } |
300 | 300 | ||
@@ -364,7 +364,9 @@ static void i2o_exec_lct_modified(struct i2o_controller *c) | |||
364 | if (i2o_device_parse_lct(c) != -EAGAIN) | 364 | if (i2o_device_parse_lct(c) != -EAGAIN) |
365 | change_ind = c->lct->change_ind + 1; | 365 | change_ind = c->lct->change_ind + 1; |
366 | 366 | ||
367 | #ifdef CONFIG_I2O_LCT_NOTIFY_ON_CHANGES | ||
367 | i2o_exec_lct_notify(c, change_ind); | 368 | i2o_exec_lct_notify(c, change_ind); |
369 | #endif | ||
368 | }; | 370 | }; |
369 | 371 | ||
370 | /** | 372 | /** |
@@ -512,7 +514,8 @@ static int i2o_exec_lct_notify(struct i2o_controller *c, u32 change_ind) | |||
512 | 514 | ||
513 | dev = &c->pdev->dev; | 515 | dev = &c->pdev->dev; |
514 | 516 | ||
515 | if (i2o_dma_realloc(dev, &c->dlct, sb->expected_lct_size, GFP_KERNEL)) | 517 | if (i2o_dma_realloc |
518 | (dev, &c->dlct, le32_to_cpu(sb->expected_lct_size), GFP_KERNEL)) | ||
516 | return -ENOMEM; | 519 | return -ENOMEM; |
517 | 520 | ||
518 | msg = i2o_msg_get_wait(c, I2O_TIMEOUT_MESSAGE_GET); | 521 | msg = i2o_msg_get_wait(c, I2O_TIMEOUT_MESSAGE_GET); |