From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Olav Kongas <ok@artecdesign.ee>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-usb@vger.kernel.org
Subject: [PATCH 1/3] USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro
Date: Fri, 15 Oct 2010 13:26:21 +0800 [thread overview]
Message-ID: <1287120381.20429.1.camel@mola> (raw)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/usb/host/isp116x-hcd.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index d9e8212..0da7fc0 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1557,8 +1557,6 @@ static int isp116x_remove(struct platform_device *pdev)
return 0;
}
-#define resource_len(r) (((r)->end - (r)->start) + 1)
-
static int __devinit isp116x_probe(struct platform_device *pdev)
{
struct usb_hcd *hcd;
@@ -1597,7 +1595,7 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
ret = -EBUSY;
goto err1;
}
- addr_reg = ioremap(addr->start, resource_len(addr));
+ addr_reg = ioremap(addr->start, resource_size(addr));
if (addr_reg == NULL) {
ret = -ENOMEM;
goto err2;
@@ -1606,7 +1604,7 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
ret = -EBUSY;
goto err3;
}
- data_reg = ioremap(data->start, resource_len(data));
+ data_reg = ioremap(data->start, resource_size(data));
if (data_reg == NULL) {
ret = -ENOMEM;
goto err4;
--
1.7.2
next reply other threads:[~2010-10-15 5:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-15 5:26 Axel Lin [this message]
2010-10-15 5:27 ` [PATCH 2/3] USB: isp1362-hcd - use resource_size instead of defining its own resource_len macro Axel Lin
2010-10-15 5:43 ` Mike Frysinger
2010-10-15 5:29 ` [PATCH 3/3] USB: ohci-sh " Axel Lin
2010-10-15 7:58 ` Yoshihiro Shimoda
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=1287120381.20429.1.camel@mola \
--to=axel.lin@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=ok@artecdesign.ee \
/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