X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fioport.h;h=22d2115458c67fe1e6e499996a9218af36fb772a;hb=1a4e564b7db999fbe5d88318c96ac8747699d417;hp=2cd07cc29687c49bd1cf8a0883cf5c72bbb4e762;hpb=5b664cb235e97afbf34db9c4d77f08ebd725335e;p=linux-2.6 diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 2cd07cc296..22d2115458 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -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))