lkml.org 
[lkml]   [2015]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 5/8] misc: sram: report correct SRAM pool size
Date
Since some space in SRAM may be reserved, report the left free space
in the allocated memory pool instead of total physical size of the
SRAM device.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
---
Changes from v1 to v2:
- rebased on top of v2 3/9 misc: sram: use phys_addr_t instead of u32
for physical address

drivers/misc/sram.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index adbbdb2..9997e2f 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -194,7 +194,7 @@ static int sram_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, sram);

dev_dbg(&pdev->dev, "SRAM pool: %zu KiB @ 0x%p\n",
- size / 1024, virt_base);
+ gen_pool_size(sram->pool) / 1024, virt_base);

return 0;

--
2.1.4


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