]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/message/i2o/iop.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
[linux-2.6-omap-h63xx.git] / drivers / message / i2o / iop.c
index 0e465186196c74e33a707297f3c800566f6db053..3305c12372a2f341c68fbca98f3ab5c58e2f7f9a 100644 (file)
@@ -32,7 +32,7 @@
 #include "core.h"
 
 #define OSM_NAME       "i2o"
-#define OSM_VERSION    "1.316"
+#define OSM_VERSION    "1.325"
 #define OSM_DESCRIPTION        "I2O subsystem"
 
 /* global I2O controller list */
@@ -683,9 +683,10 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
                        c->mem_alloc = 1;
                        sb->current_mem_size = 1 + res->end - res->start;
                        sb->current_mem_base = res->start;
-                       osm_info("%s: allocated %ld bytes of PCI memory at "
-                                "0x%08lX.\n", c->name,
-                                1 + res->end - res->start, res->start);
+                       osm_info("%s: allocated %llu bytes of PCI memory at "
+                               "0x%016llX.\n", c->name,
+                               (unsigned long long)(1 + res->end - res->start),
+                               (unsigned long long)res->start);
                }
        }
 
@@ -704,9 +705,10 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
                        c->io_alloc = 1;
                        sb->current_io_size = 1 + res->end - res->start;
                        sb->current_mem_base = res->start;
-                       osm_info("%s: allocated %ld bytes of PCI I/O at 0x%08lX"
-                                ".\n", c->name, 1 + res->end - res->start,
-                                res->start);
+                       osm_info("%s: allocated %llu bytes of PCI I/O at "
+                               "0x%016llX.\n", c->name,
+                               (unsigned long long)(1 + res->end - res->start),
+                               (unsigned long long)res->start);
                }
        }
 
@@ -804,8 +806,6 @@ void i2o_iop_remove(struct i2o_controller *c)
 
        /* Ask the IOP to switch to RESET state */
        i2o_iop_reset(c);
-
-       put_device(&c->device);
 }
 
 /**
@@ -838,12 +838,11 @@ static int i2o_systab_build(void)
        i2o_systab.len = sizeof(struct i2o_sys_tbl) + num_controllers *
            sizeof(struct i2o_sys_tbl_entry);
 
-       systab = i2o_systab.virt = kmalloc(i2o_systab.len, GFP_KERNEL);
+       systab = i2o_systab.virt = kzalloc(i2o_systab.len, GFP_KERNEL);
        if (!systab) {
                osm_err("unable to allocate memory for System Table\n");
                return -ENOMEM;
        }
-       memset(systab, 0, i2o_systab.len);
 
        systab->version = I2OVERSION;
        systab->change_ind = change_ind + 1;
@@ -1019,16 +1018,6 @@ static int i2o_hrt_get(struct i2o_controller *c)
        return -EBUSY;
 }
 
-/**
- *     i2o_iop_free - Free the i2o_controller struct
- *     @c: I2O controller to free
- */
-void i2o_iop_free(struct i2o_controller *c)
-{
-       i2o_pool_free(&c->in_msg);
-       kfree(c);
-};
-
 /**
  *     i2o_iop_release - release the memory for a I2O controller
  *     @dev: I2O controller which should be released
@@ -1058,20 +1047,19 @@ struct i2o_controller *i2o_iop_alloc(void)
        struct i2o_controller *c;
        char poolname[32];
 
-       c = kmalloc(sizeof(*c), GFP_KERNEL);
+       c = kzalloc(sizeof(*c), GFP_KERNEL);
        if (!c) {
                osm_err("i2o: Insufficient memory to allocate a I2O controller."
                        "\n");
                return ERR_PTR(-ENOMEM);
        }
-       memset(c, 0, sizeof(*c));
 
        c->unit = unit++;
        sprintf(c->name, "iop%d", c->unit);
 
        snprintf(poolname, sizeof(poolname), "i2o_%s_msg_inpool", c->name);
        if (i2o_pool_alloc
-           (&c->in_msg, poolname, I2O_INBOUND_MSG_FRAME_SIZE * 4,
+           (&c->in_msg, poolname, I2O_INBOUND_MSG_FRAME_SIZE * 4 + sizeof(u32),
             I2O_MSG_INPOOL_MIN)) {
                kfree(c);
                return ERR_PTR(-ENOMEM);
@@ -1253,7 +1241,6 @@ EXPORT_SYMBOL(i2o_cntxt_list_remove);
 EXPORT_SYMBOL(i2o_cntxt_list_get_ptr);
 #endif
 EXPORT_SYMBOL(i2o_msg_get_wait);
-EXPORT_SYMBOL(i2o_msg_nop);
 EXPORT_SYMBOL(i2o_find_iop);
 EXPORT_SYMBOL(i2o_iop_find_device);
 EXPORT_SYMBOL(i2o_event_register);