]> Pileus Git - ~andy/linux/blobdiff - drivers/message/i2o/iop.c
Merge branch 'nfs-for-3.1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
[~andy/linux] / drivers / message / i2o / iop.c
index 090d2a3a6548e0aa2d56ca5350a6ae2d012945a7..a8c08f332da04c596cf1ae3aa33c2a09f1a4f892 100644 (file)
@@ -681,11 +681,11 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
                if (root && allocate_resource(root, res, sb->desired_mem_size, sb->desired_mem_size, sb->desired_mem_size, 1 << 20,     /* Unspecified, so use 1Mb and play safe */
                                              NULL, NULL) >= 0) {
                        c->mem_alloc = 1;
-                       sb->current_mem_size = 1 + res->end - res->start;
+                       sb->current_mem_size = resource_size(res);
                        sb->current_mem_base = 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)resource_size(res),
                                (unsigned long long)res->start);
                }
        }
@@ -703,11 +703,11 @@ static int i2o_iop_systab_set(struct i2o_controller *c)
                if (root && allocate_resource(root, res, sb->desired_io_size, sb->desired_io_size, sb->desired_io_size, 1 << 20,        /* Unspecified, so use 1Mb and play safe */
                                              NULL, NULL) >= 0) {
                        c->io_alloc = 1;
-                       sb->current_io_size = 1 + res->end - res->start;
+                       sb->current_io_size = resource_size(res);
                        sb->current_mem_base = 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)resource_size(res),
                                (unsigned long long)res->start);
                }
        }