Skip to content
Commit 449d2c75 authored by Julia Lawall's avatar Julia Lawall Committed by Jean Delvare
Browse files

i2c-pnx: Correct use of request_region/request_mem_region



request_mem_region should be used when ioremap is used subsequently.
release_region is then correspondingly replaced by release_mem_region.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
expression start,E;
@@

- request_region
+ request_mem_region
  (start,...)
... when != request_mem_region(start,...)
    when != start = E
ioremap(start,...)

@@
expression r.start;
@@

- release_region
+ release_mem_region
  (start,...)
// </smpl>

Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
Cc: Vitaly Wool <vitalywool@gmail.com>
Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent a1867d36
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment