lkml.org 
[lkml]   [2015]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC] New of_io_release_and_unmap()
From
On Wed, Feb 25, 2015 at 11:23 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 25 February 2015 11:20:41 Joshua Clayton wrote:
>> Hello folks,
>> I notice that io_request_and_map has no inverse.
>> I would like to add a new function to undo what it does.
>>
>
> What do you want to use this for? So far all users are in essential drivers
> (clk and clocksource) that result in a boot failure if this goes wrong.
>
That explains a lot. It looks (to my n00b eye) like this function leaks some
references, which is more ok if the ref counters should never be
decremented to 0.

> Normal drivers can probably always use devm_ioremap_resource(), which
> has an automatic cleanup.
>
Hmmm.
My use case is indeed a normal driver, which could definitely
use devm_ioremap_resource()

> Arnd

That would leave only "completeness" as a reason. Probably not needed.


\
 
 \ /
  Last update: 2015-02-25 21:41    [W:0.178 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site