Commit eaaaa304 authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] clean up overzealous deprecated warning

1) We export __check_region, so making it __deprecated gives a spurious
   warning in kernel/ksyms.c.
2) Other warnings refer to __check_region rather than check_region,
   which has confused some people.

Make check_region an inline, not a macro, and deprecate *that*.
parent b1705344
......@@ -105,12 +105,15 @@ extern int allocate_resource(struct resource *root, struct resource *new,
extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name);
/* Compatibility cruft */
#define check_region(start,n) __check_region(&ioport_resource, (start), (n))
#define release_region(start,n) __release_region(&ioport_resource, (start), (n))
#define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n))
#define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n))
extern int __deprecated __check_region(struct resource *, unsigned long, unsigned long);
extern int __check_region(struct resource *, unsigned long, unsigned long);
extern void __release_region(struct resource *, unsigned long, unsigned long);
static inline int __deprecated check_region(unsigned long s, unsigned long n)
{
return __check_region(&ioport_resource, s, n);
}
#endif /* _LINUX_IOPORT_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment