aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>2015-06-01 08:29:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-12 20:03:56 -0400
commit4914f1c7179f056b69b0e2bddc3f5daadb70609d (patch)
tree1daf370879d26a844dfc0242ab19542e2bc6ed3f
parentd687b1fa672874bf2c745fc936bec2e1ed75a331 (diff)
misc: sram: report correct SRAM pool size
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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/sram.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index baada4761b35..dd66d5f72ee9 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -190,7 +190,8 @@ static int sram_probe(struct platform_device *pdev)
190 190
191 platform_set_drvdata(pdev, sram); 191 platform_set_drvdata(pdev, sram);
192 192
193 dev_dbg(&pdev->dev, "SRAM pool: %ld KiB @ 0x%p\n", size / 1024, virt_base); 193 dev_dbg(&pdev->dev, "SRAM pool: %zu KiB @ 0x%p\n",
194 gen_pool_size(sram->pool) / 1024, virt_base);
194 195
195 return 0; 196 return 0;
196 197