lkml.org 
[lkml]   [2020]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] driver core: platform: provide devm_platform_iounremap_resource
hi Greg:
> Why are you adding new functions but not actually calling them anywhere?

Below patch introduce a single helper, devm_platform_ioremap_resource,
which combines
platform_get_resource() and devm_ioremap_resource(). But there is no
single helper to release
those resources in driver removing stage.

https://lore.kernel.org/lkml/20190215152507.31066-2-brgl@bgdev.pl/

That means driver owner still need to call below (*) and (**) for
releasing resource.
Therefore, this patch adds a single release helper that can be paired with
devm_platform_ioremap_resource.

Appreciate ur kind help,

foo_probe(pdev)
{
iomem = devm_platform_ioremap_resource(pdev, 0);
....
}


foo_remove(pdev)
{
devm_iounmap(iomem); (*)
devm_release_mem_region(dev, res->start, size); (**)
........................
}

\
 
 \ /
  Last update: 2020-10-05 17:25    [W:0.926 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site