resource: add a not device managed request_free_mem_region variant
authorChristoph Hellwig <hch@lst.de>
Sun, 18 Aug 2019 09:05:54 +0000 (11:05 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 20 Aug 2019 12:39:41 +0000 (09:39 -0300)
commit0c385190392d8c7128fb7517b3c676e19c7b8808
treea4ac48e3483737db04c0ec73ea663e873b8f6a6e
parent8402ce61bec28a1b73ec467b4c146f1e3f587044
resource: add a not device managed request_free_mem_region variant

Factor out the guts of devm_request_free_mem_region so that we can
implement both a device managed and a manually release version as tiny
wrappers around it.

Link: https://lore.kernel.org/r/20190818090557.17853-2-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Tested-by: Bharata B Rao <bharata@linux.ibm.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
include/linux/ioport.h
kernel/resource.c