author: John Garry <john.garry@huawei.com> 2019-07-30 21:29:54 +0800
committer: Wei Xu <xuwei5@hisilicon.com> 2019-08-13 14:54:24 +0800
commit: b884e2de2afc68ce30f7093747378ef972dde253
parent: 0a27142bd1ee259e24a0be2b0133e5ca5df8da91
Commit Summary:
Diffstat:
1 file changed, 14 insertions, 0 deletions
diff --git a/lib/logic_pio.c b/lib/logic_pio.c
index d0165c88f705..905027574e5d 100644
--- a/lib/logic_pio.c
+++ b/lib/logic_pio.c
@@ -98,6 +98,20 @@ end_register:
return ret;
}
+/**
+ * logic_pio_unregister_range - unregister a logical PIO range for a host
+ * @range: pointer to the IO range which has been already registered.
+ *
+ * Unregister a previously-registered IO range node.
+ */
+void logic_pio_unregister_range(struct logic_pio_hwaddr *range)
+{
+ mutex_lock(&io_range_mutex);
+ list_del_rcu(&range->list);
+ mutex_unlock(&io_range_mutex);
+ synchronize_rcu();
+}
+
/**
* find_io_range_by_fwnode - find logical PIO range for given FW node
* @fwnode: FW node handle associated with logical PIO range