diff options
author | John Garry <john.garry@huawei.com> | 2019-07-30 21:29:54 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-06 10:22:19 +0200 |
commit | c4616a9b3d3f8763532dfeded6a7e9e1f592bba7 (patch) | |
tree | 4c85408b420780a1a118aaea0ade2fe3ff30d361 /include | |
parent | 7faef13e6f68d50aa50846cfc79ae499f82becf6 (diff) | |
download | linux-stable-c4616a9b3d3f8763532dfeded6a7e9e1f592bba7.tar.gz linux-stable-c4616a9b3d3f8763532dfeded6a7e9e1f592bba7.tar.bz2 linux-stable-c4616a9b3d3f8763532dfeded6a7e9e1f592bba7.zip |
lib: logic_pio: Add logic_pio_unregister_range()
commit b884e2de2afc68ce30f7093747378ef972dde253 upstream.
Add a function to unregister a logical PIO range.
Logical PIO space can still be leaked when unregistering certain
LOGIC_PIO_CPU_MMIO regions, but this acceptable for now since there are no
callers to unregister LOGIC_PIO_CPU_MMIO regions, and the logical PIO
region allocation scheme would need significant work to improve this.
Cc: stable@vger.kernel.org
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/logic_pio.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/logic_pio.h b/include/linux/logic_pio.h index cbd9d8495690..88e1e6304a71 100644 --- a/include/linux/logic_pio.h +++ b/include/linux/logic_pio.h @@ -117,6 +117,7 @@ struct logic_pio_hwaddr *find_io_range_by_fwnode(struct fwnode_handle *fwnode); unsigned long logic_pio_trans_hwaddr(struct fwnode_handle *fwnode, resource_size_t hw_addr, resource_size_t size); int logic_pio_register_range(struct logic_pio_hwaddr *newrange); +void logic_pio_unregister_range(struct logic_pio_hwaddr *range); resource_size_t logic_pio_to_hwaddr(unsigned long pio); unsigned long logic_pio_trans_cpuaddr(resource_size_t hw_addr); |