X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Flmb.c;h=b1fc526065245fc5cf34cf7af25d1d6e061014c7;hb=eb3e5cce2b39a266a1a167fa4290939db20ef5d6;hp=9cee17142b2cdc6d2d7a78c8b6ca5fd6573eb4b8;hpb=35858adbfca13678af99fb31618ef4428d6dedb0;p=karo-tx-linux.git diff --git a/lib/lmb.c b/lib/lmb.c index 9cee17142b2c..b1fc52606524 100644 --- a/lib/lmb.c +++ b/lib/lmb.c @@ -205,9 +205,8 @@ long lmb_add(u64 base, u64 size) } -long lmb_remove(u64 base, u64 size) +static long __lmb_remove(struct lmb_region *rgn, u64 base, u64 size) { - struct lmb_region *rgn = &(lmb.memory); u64 rgnbegin, rgnend; u64 end = base + size; int i; @@ -254,6 +253,16 @@ long lmb_remove(u64 base, u64 size) return lmb_add_region(rgn, end, rgnend - end); } +long lmb_remove(u64 base, u64 size) +{ + return __lmb_remove(&lmb.memory, base, size); +} + +long __init lmb_free(u64 base, u64 size) +{ + return __lmb_remove(&lmb.reserved, base, size); +} + long __init lmb_reserve(u64 base, u64 size) { struct lmb_region *_rgn = &lmb.reserved;