[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1430570583-8565-6-git-send-email-vladimir_zapolskiy@mentor.com>
Date: Sat, 2 May 2015 15:42:59 +0300
From: Vladimir Zapolskiy <vladimir_zapolskiy@...tor.com>
To: Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Heiko Stübner <heiko@...ech.de>,
Philipp Zabel <p.zabel@...gutronix.de>
CC: <linux-kernel@...r.kernel.org>
Subject: [PATCH 5/9] 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@...tor.com>
---
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 d0abd60..9ea265c 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -197,7 +197,7 @@ static int sram_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, sram);
dev_dbg(&pdev->dev, "SRAM pool: %zx KiB @ 0x%p\n",
- size / SZ_1K, virt_base);
+ gen_pool_size(sram->pool) / SZ_1K, virt_base);
return 0;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists