aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/resource.c
diff options
context:
space:
mode:
authorJakub Sitnicki <jsitnicki@gmail.com>2015-04-15 19:16:44 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-15 19:35:22 -0400
commit96831c0a6738f88f89e7012f4df0a747514af0a0 (patch)
treed08f743a440e52e035dd8efb109c26c36ce8169b /kernel/resource.c
parent2813893f8b197a14f1e1ddb04d99bce46817c84a (diff)
kernel/resource.c: remove deprecated __check_region() and friends
All users of __check_region(), check_region(), and check_mem_region() are gone. We got rid of the last user in v4.0-rc1. Remove them. bloat-o-meter on x86_64 shows: add/remove: 0/3 grow/shrink: 0/0 up/down: 0/-102 (-102) function old new delta __kstrtab___check_region 15 - -15 __ksymtab___check_region 16 - -16 __check_region 71 - -71 Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/resource.c')
-rw-r--r--kernel/resource.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/kernel/resource.c b/kernel/resource.c
index 19f2357dfda3..90552aab5f2d 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -1034,8 +1034,6 @@ resource_size_t resource_alignment(struct resource *res)
1034 * 1034 *
1035 * request_region creates a new busy region. 1035 * request_region creates a new busy region.
1036 * 1036 *
1037 * check_region returns non-zero if the area is already busy.
1038 *
1039 * release_region releases a matching busy region. 1037 * release_region releases a matching busy region.
1040 */ 1038 */
1041 1039
@@ -1098,36 +1096,6 @@ struct resource * __request_region(struct resource *parent,
1098EXPORT_SYMBOL(__request_region); 1096EXPORT_SYMBOL(__request_region);
1099 1097
1100/** 1098/**
1101 * __check_region - check if a resource region is busy or free
1102 * @parent: parent resource descriptor
1103 * @start: resource start address
1104 * @n: resource region size
1105 *
1106 * Returns 0 if the region is free at the moment it is checked,
1107 * returns %-EBUSY if the region is busy.
1108 *
1109 * NOTE:
1110 * This function is deprecated because its use is racy.
1111 * Even if it returns 0, a subsequent call to request_region()
1112 * may fail because another driver etc. just allocated the region.
1113 * Do NOT use it. It will be removed from the kernel.
1114 */
1115int __check_region(struct resource *parent, resource_size_t start,
1116 resource_size_t n)
1117{
1118 struct resource * res;
1119
1120 res = __request_region(parent, start, n, "check-region", 0);
1121 if (!res)
1122 return -EBUSY;
1123
1124 release_resource(res);
1125 free_resource(res);
1126 return 0;
1127}
1128EXPORT_SYMBOL(__check_region);
1129
1130/**
1131 * __release_region - release a previously reserved resource region 1099 * __release_region - release a previously reserved resource region
1132 * @parent: parent resource descriptor 1100 * @parent: parent resource descriptor
1133 * @start: resource start address 1101 * @start: resource start address