aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/i2o/i2o_config.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/i2o/i2o_config.c')
-rw-r--r--drivers/message/i2o/i2o_config.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index 8160a1f6c73a..8ebc86ff1002 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -368,9 +368,9 @@ static int i2o_cfg_swul(unsigned long arg)
368 368
369 i2o_dma_free(&c->pdev->dev, &buffer); 369 i2o_dma_free(&c->pdev->dev, &buffer);
370 370
371return_ret: 371 return_ret:
372 return ret; 372 return ret;
373return_fault: 373 return_fault:
374 ret = -EFAULT; 374 ret = -EFAULT;
375 goto return_ret; 375 goto return_ret;
376}; 376};
@@ -519,7 +519,8 @@ static int i2o_cfg_evt_get(unsigned long arg, struct file *fp)
519 519
520#ifdef CONFIG_I2O_EXT_ADAPTEC 520#ifdef CONFIG_I2O_EXT_ADAPTEC
521#ifdef CONFIG_COMPAT 521#ifdef CONFIG_COMPAT
522static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long arg) 522static int i2o_cfg_passthru32(struct file *file, unsigned cmnd,
523 unsigned long arg)
523{ 524{
524 struct i2o_cmd_passthru32 __user *cmd; 525 struct i2o_cmd_passthru32 __user *cmd;
525 struct i2o_controller *c; 526 struct i2o_controller *c;
@@ -646,8 +647,9 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long ar
646 flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) { 647 flag_count & 0x04000000 /*I2O_SGL_FLAGS_DIR */ ) {
647 // TODO 64bit fix 648 // TODO 64bit fix
648 if (copy_from_user 649 if (copy_from_user
649 (p->virt, (void __user *)(unsigned long)sg[i].addr_bus, 650 (p->virt,
650 sg_size)) { 651 (void __user *)(unsigned long)sg[i].
652 addr_bus, sg_size)) {
651 printk(KERN_DEBUG 653 printk(KERN_DEBUG
652 "%s: Could not copy SG buf %d FROM user\n", 654 "%s: Could not copy SG buf %d FROM user\n",
653 c->name, i); 655 c->name, i);
@@ -738,11 +740,12 @@ static int i2o_cfg_passthru32(struct file *file, unsigned cmnd, unsigned long ar
738 return rcode; 740 return rcode;
739} 741}
740 742
741static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg) 743static long i2o_cfg_compat_ioctl(struct file *file, unsigned cmd,
744 unsigned long arg)
742{ 745{
743 int ret; 746 int ret;
744 lock_kernel(); 747 lock_kernel();
745 switch (cmd) { 748 switch (cmd) {
746 case I2OGETIOPS: 749 case I2OGETIOPS:
747 ret = i2o_cfg_ioctl(NULL, file, cmd, arg); 750 ret = i2o_cfg_ioctl(NULL, file, cmd, arg);
748 break; 751 break;
@@ -1136,6 +1139,7 @@ static int __init i2o_config_old_init(void)
1136 osm_err("can't register device.\n"); 1139 osm_err("can't register device.\n");
1137 return -EBUSY; 1140 return -EBUSY;
1138 } 1141 }
1142
1139 return 0; 1143 return 0;
1140} 1144}
1141 1145