您的位置:首页 > 其它

why should we use requset_mem_region()before using ioremap()?

2013-08-02 10:39 489 查看
request_mem_region
 allows
to tell the kernel that your driver is going to use this range of I/O addresses, which will prevent other drivers to make an overlapping call to 
request_mem_region
.
This mechanism does not do any kind of mapping, it's a pure reservation mechanism, which relies on the fact that all kernel device drivers must be nice, and they must call 
request_mem_region
,
check the return value, and behave properly in case of error.

So it is completely logical that your code works without 
request_mem_region
,
it's just that it doesn't comply with the kernel coding rules.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: