summaryrefslogtreecommitdiff
path: root/include/linux/ioport.h
diff options
context:
space:
mode:
authorToshi Kani <toshi.kani@hpe.com>2016-03-09 12:47:04 -0700
committerDan Williams <dan.j.williams@intel.com>2016-03-09 11:07:20 -0800
commitff3cc952d3f009e6c376cc40651b87187ce364a6 (patch)
treec0b685a62ea8908bfdab98dc372bfe75fd0f291e /include/linux/ioport.h
parent4e0d8f7eff3fbfa3e3ac5782669c078f590dc9e2 (diff)
resource: Add remove_resource interface
insert_resource() and insert_resource_conflict() are called by resource producers to insert a new resource. When there is any conflict, they move conflicting resources down to the children of the new resource. There is no destructor of these interfaces, however. Add remove_resource(), which removes a resource previously inserted by insert_resource() or insert_resource_conflict(), and moves the children up to where they were before. __release_resource() is changed to have @release_child, so that this function can be used for remove_resource() as well. Also add comments to clarify that these functions are intended for producers of resources to avoid any confusion with request/release_resource() for consumers. Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Borislav Petkov <bp@suse.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/ioport.h')
-rw-r--r--include/linux/ioport.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index afb45597fb5f..8017b8bf45fa 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -174,6 +174,7 @@ extern void reserve_region_with_split(struct resource *root,
extern struct resource *insert_resource_conflict(struct resource *parent, struct resource *new);
extern int insert_resource(struct resource *parent, struct resource *new);
extern void insert_resource_expand_to_fit(struct resource *root, struct resource *new);
+extern int remove_resource(struct resource *old);
extern void arch_remove_reservations(struct resource *avail);
extern int allocate_resource(struct resource *root, struct resource *new,
resource_size_t size, resource_size_t min,