treewide: Convert uses of struct resource to resource_size(ptr)
[pandora-kernel.git] / drivers / pcmcia / rsrc_nonstatic.c
index b187555..9da9656 100644 (file)
@@ -770,7 +770,7 @@ static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
                                                        res->end + num);
                        if (!ret) {
                                ret = adjust_resource(s->io[i].res, res->start,
-                                              res->end - res->start + num + 1);
+                                                     resource_size(res) + num);
                                if (ret)
                                        continue;
                                *base = try;
@@ -788,8 +788,8 @@ static int nonstatic_find_io(struct pcmcia_socket *s, unsigned int attr,
                                                        res->end);
                        if (!ret) {
                                ret = adjust_resource(s->io[i].res,
-                                              res->start - num,
-                                              res->end - res->start + num + 1);
+                                                     res->start - num,
+                                                     resource_size(res) + num);
                                if (ret)
                                        continue;
                                *base = try;