aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2010-03-11 19:01:09 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-03-23 16:33:50 -0400
commit66f1207bce10fd80ee8ce99b67d617644612f05e (patch)
tree3031bb74dce8c54af69dcd4aa7e566f40a5511ce /include
parent7c9e2b1c4784c6e574f69dbd904b2822f2e04d6e (diff)
resources: add interfaces that return conflict information
request_resource() and insert_resource() only return success or failure, which no information about what existing resource conflicted with the proposed new reservation. This patch adds request_resource_conflict() and insert_resource_conflict(), which return the conflicting resource. Callers may use this for better error messages or to adjust the new resource and retry the request. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ioport.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 71ab79da7e7..26fad187d66 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -112,12 +112,14 @@ struct resource_list {
112extern struct resource ioport_resource; 112extern struct resource ioport_resource;
113extern struct resource iomem_resource; 113extern struct resource iomem_resource;
114 114
115extern struct resource *request_resource_conflict(struct resource *root, struct resource *new);
115extern int request_resource(struct resource *root, struct resource *new); 116extern int request_resource(struct resource *root, struct resource *new);
116extern int release_resource(struct resource *new); 117extern int release_resource(struct resource *new);
117void release_child_resources(struct resource *new); 118void release_child_resources(struct resource *new);
118extern void reserve_region_with_split(struct resource *root, 119extern void reserve_region_with_split(struct resource *root,
119 resource_size_t start, resource_size_t end, 120 resource_size_t start, resource_size_t end,
120 const char *name); 121 const char *name);
122extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new);
121extern int insert_resource(struct resource *parent, struct resource *new); 123extern int insert_resource(struct resource *parent, struct resource *new);
122extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new); 124extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);
123extern int allocate_resource(struct resource *root, struct resource *new, 125extern int allocate_resource(struct resource *root, struct resource *new,