Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4914f1c7 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Greg Kroah-Hartman
Browse files

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: default avatarVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d687b1fa
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -190,7 +190,8 @@ static int sram_probe(struct platform_device *pdev)

	platform_set_drvdata(pdev, sram);

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

	return 0;