diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2002-10-29 05:14:51 -0800 |
|---|---|---|
| committer | Anton Blanchard <anton@samba.org> | 2002-10-29 05:14:51 -0800 |
| commit | 5b8e28f396e76d3e8fa03f86e6500d73a0378f9b (patch) | |
| tree | c569c3a8ecb0a9231f6ff9ba3267fb6b8615fb73 /kernel/resource.c | |
| parent | d5c7423490c90dd46be7482eebfaa4f7df2ae05f (diff) | |
[PATCH] Get rid of check_resource() before it becomes a problem
The new resource interface foolishly replicated the (obsolete,
racy) spirit of the check_region call as check_resource. You
should use request_resource/release_resource instead.
Diffstat (limited to 'kernel/resource.c')
| -rw-r--r-- | kernel/resource.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 57541cc03d09..9664ad073db7 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -131,20 +131,6 @@ int release_resource(struct resource *old) return retval; } -int check_resource(struct resource *root, unsigned long start, unsigned long len) -{ - struct resource *conflict, tmp; - - tmp.start = start; - tmp.end = start + len - 1; - write_lock(&resource_lock); - conflict = __request_resource(root, &tmp); - if (!conflict) - __release_resource(&tmp); - write_unlock(&resource_lock); - return conflict ? -EBUSY : 0; -} - /* * Find empty slot in the resource tree given range and alignment. */ |
