From f65380c07b64b0e45ad5c7d70ca54a9cde1c00db Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Tue, 15 Dec 2009 16:48:21 -0800 Subject: resource: constify arg to resource_size() and resource_type() resource_size() doesn't change the resource it operates on, so the res parameter can be marked const. Same for resource_type(). Signed-off-by: Jean Delvare Reviewed-by: WANG Cong Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ioport.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 83aa81297ea..7129504e053 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h @@ -126,11 +126,11 @@ 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) +static inline resource_size_t resource_size(const struct resource *res) { return res->end - res->start + 1; } -static inline unsigned long resource_type(struct resource *res) +static inline unsigned long resource_type(const struct resource *res) { return res->flags & IORESOURCE_TYPE_BITS; } -- cgit v1.2.3-18-g5258