[lkml]   [2005]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Linux-2.6.13 : __check_region is deprecated
On 8/30/05, Stephane Wirtel <> wrote:
> Hi,
> By compiling my kernel, I can see that the __check_region function (in
> kernel/resource.c) is deprecated.
> Is there a function to replace this deprecated function ?
Yes, you just call request_region() and check its return value.

> Why is it deprecated ?
In the past you first called check_region() followed by
request_region() if the region was available. That is not safe as you
could get interrupted between the two calls and something else might
have already grabbed the region you thought was free by the time you
get to calling request_region(). So, request_region() was rewritten
to do the checking internally and let the caller know via its return
value if
acquiring the region failed or succeded.
So these days check_region should no longer be used. It's a historic
relic. request_region() should be used directly instead. That's why it
is deprecated.

Jesper Juhl <>
Don't top-post
Plain text mails only, please
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-30 01:29    [W:0.039 / U:8.984 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site