From 084ad7719577bd3d56e697d08b9d7eba236bcea1 Mon Sep 17 00:00:00 2001 From: Patrik Jakobsson Date: Sat, 5 Sep 2015 14:38:06 +0200 Subject: [PATCH] Store size and aligned size in memory object Signed-off-by: Patrik Jakobsson --- isp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/isp.c b/isp.c index 12b7b96..0cb23df 100644 --- a/isp.c +++ b/isp.c @@ -51,12 +51,15 @@ struct isp_mem_obj *isp_mem_create(struct bcwc_private *dev_priv, PAGE_SIZE, NULL, NULL); if (ret) { dev_err(&dev_priv->pdev->dev, - "Failed to allocate resource (size: %Ld, start: %Ld, end: %Ld, ret: %d)\n", size, root->start, root->end, ret); + "Failed to allocate resource (size: %Ld, start: %Ld, end: %Ld)\n", + size, root->start, root->end); kfree(obj); obj = NULL; } obj->offset = obj->base.start - root->start; + obj->size = size; + obj->size_aligned = obj->base.end - obj->base.start; return obj; }