]> git.baikalelectronics.ru Git - kernel.git/commit
lib: logic_pio: Avoid possible overlap for unregistering regions
authorJohn Garry <john.garry@huawei.com>
Tue, 30 Jul 2019 13:29:53 +0000 (21:29 +0800)
committerWei Xu <xuwei5@hisilicon.com>
Tue, 13 Aug 2019 06:54:19 +0000 (14:54 +0800)
commit582bb7a0b990c77e3fadb33b5326f5d86a43ab92
treed72620fb516307f9d41ae0a44be406d2144bb5f2
parentae5aafc7d6b9d5b82a335eebb86adf3ffb9d4971
lib: logic_pio: Avoid possible overlap for unregistering regions

The code was originally written to not support unregistering logical PIO
regions.

To accommodate supporting unregistering logical PIO regions, subtly modify
LOGIC_PIO_CPU_MMIO region registration code, such that the "end" of the
registered regions is the "end" of the last region, and not the sum of
the sizes of all the registered regions.

Cc: stable@vger.kernel.org
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Wei Xu <xuwei5@hisilicon.com>
lib/logic_pio.c