unmap memory mapped with devm_ioremap_resource
Constantine Shulyupin
constantine.shulyupin at gmail.com
Fri Dec 2 13:01:40 EST 2022
Hi,
I suppose you are looking for `devm_iounmap`.
You can find example of usage in `drivers/fpga/dfl.c`:
...
feature->ioaddr =
devm_ioremap_resource(binfo->dev,
&finfo->mmio_res);
...
static void build_info_complete(struct build_feature_devs_info *binfo)
{
devm_iounmap(binfo->dev, binfo->ioaddr);
devm_release_mem_region(binfo->dev, binfo->start, binfo->len);
}
Regards,
Costa
On Fri, 2 Dec 2022 at 19:25, Adrian Fiergolski
<adrian.fiergolski at fastree3d.com> wrote:
>
> Hello,
>
> I am extending xilinx-hls driver
> (https://github.com/Xilinx/linux-xlnx/blob/master/drivers/media/platform/xilinx/xilinx-hls.c)
> to support of_overlay.
>
> In order to reflect in the driver changes being applied by the overlay
> to the device tree, I need to unmap first the memory mapped with
> devm_ioremap_resource. How to do it properly?
>
> I think it's uncommon, as normally kernel (devm_* functions) manages
> those resources itself with devres, so I can't find inspiration in other
> drivers.
>
> Regards,
> Adrian
>
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
--
Constantine Shulyupin
More information about the Kernelnewbies
mailing list