From: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
To: linux-media@vger.kernel.org
Cc: mchehab@redhat.com, gregkh@linuxfoundation.org,
prabhakar.lad@ti.com, sakari.ailus@iki.fi,
laurent.pinchart@ideasonboard.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Subject: [PATCH v2] drivers: staging: davinci_vpfe: use resource_size()
Date: Mon, 18 Mar 2013 21:06:20 +0200 [thread overview]
Message-ID: <1363633580-2920-1-git-send-email-silviupopescu1990@gmail.com> (raw)
This uses the resource_size() function instead of explicit computation.
Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
---
drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 2 +-
drivers/staging/media/davinci_vpfe/dm365_isif.c | 4 ++--
drivers/staging/media/davinci_vpfe/dm365_resizer.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
index 9285353..05673ed 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c
@@ -1859,5 +1859,5 @@ void vpfe_ipipe_cleanup(struct vpfe_ipipe_device *ipipe,
iounmap(ipipe->isp5_base_addr);
res = platform_get_resource(pdev, IORESOURCE_MEM, 4);
if (res)
- release_mem_region(res->start, res->end - res->start + 1);
+ release_mem_region(res->start, resource_size(res));
}
diff --git a/drivers/staging/media/davinci_vpfe/dm365_isif.c b/drivers/staging/media/davinci_vpfe/dm365_isif.c
index ebeea72..c4a5660 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_isif.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_isif.c
@@ -1953,7 +1953,7 @@ static void isif_remove(struct vpfe_isif_device *isif,
res = platform_get_resource(pdev, IORESOURCE_MEM, i);
if (res)
release_mem_region(res->start,
- res->end - res->start + 1);
+ resource_size(res));
i++;
}
}
@@ -2003,7 +2003,7 @@ int vpfe_isif_init(struct vpfe_isif_device *isif, struct platform_device *pdev)
status = -ENOENT;
goto fail_nobase_res;
}
- res_len = res->end - res->start + 1;
+ res_len = resource_size(res);
res = request_mem_region(res->start, res_len, res->name);
if (!res) {
status = -EBUSY;
diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c
index 9cb0262..126f84c 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c
@@ -1995,5 +1995,5 @@ vpfe_resizer_cleanup(struct vpfe_resizer_device *vpfe_rsz,
res = platform_get_resource(pdev, IORESOURCE_MEM, 5);
if (res)
release_mem_region(res->start,
- res->end - res->start + 1);
+ resource_size(res));
}
--
1.7.9.5
next reply other threads:[~2013-03-18 19:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 19:06 Silviu-Mihai Popescu [this message]
2013-03-19 6:14 ` Prabhakar Lad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1363633580-2920-1-git-send-email-silviupopescu1990@gmail.com \
--to=silviupopescu1990@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=prabhakar.lad@ti.com \
--cc=sakari.ailus@iki.fi \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®