]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/ioport.h
byteorder: add include/linux/byteorder.h to define endian helpers
[linux-2.6-omap-h63xx.git] / include / linux / ioport.h
index 2cd07cc29687c49bd1cf8a0883cf5c72bbb4e762..22d2115458c67fe1e6e499996a9218af36fb772a 100644 (file)
@@ -118,6 +118,10 @@ extern int allocate_resource(struct resource *root, struct resource *new,
 int adjust_resource(struct resource *res, resource_size_t start,
                    resource_size_t size);
 resource_size_t resource_alignment(struct resource *res);
+static inline resource_size_t resource_size(struct resource *res)
+{
+       return res->end - res->start + 1;
+}
 
 /* Convenience shorthand with allocation */
 #define request_region(start,n,name)   __request_region(&ioport_resource, (start), (n), (name))