public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro
@ 2010-10-15  5:26 Axel Lin
  2010-10-15  5:27 ` [PATCH 2/3] USB: isp1362-hcd " Axel Lin
  2010-10-15  5:29 ` [PATCH 3/3] USB: ohci-sh " Axel Lin
  0 siblings, 2 replies; 5+ messages in thread
From: Axel Lin @ 2010-10-15  5:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Olav Kongas, Greg Kroah-Hartman, linux-usb

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




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] USB: isp1362-hcd - use resource_size instead of defining its own resource_len macro
  2010-10-15  5:26 [PATCH 1/3] USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro Axel Lin
@ 2010-10-15  5:27 ` Axel Lin
  2010-10-15  5:43   ` Mike Frysinger
  2010-10-15  5:29 ` [PATCH 3/3] USB: ohci-sh " Axel Lin
  1 sibling, 1 reply; 5+ messages in thread
From: Axel Lin @ 2010-10-15  5:27 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Mike Frysinger, Lothar Wassmann, linux-usb

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/usb/host/isp1362-hcd.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index ae30440..8196fa1 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -2649,8 +2649,6 @@ static struct hc_driver isp1362_hc_driver = {
 
 /*-------------------------------------------------------------------------*/
 
-#define resource_len(r) (((r)->end - (r)->start) + 1)
-
 static int __devexit isp1362_remove(struct platform_device *pdev)
 {
 	struct usb_hcd *hcd = platform_get_drvdata(pdev);
@@ -2672,12 +2670,12 @@ static int __devexit isp1362_remove(struct platform_device *pdev)
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
 	DBG(0, "%s: release mem_region: %08lx\n", __func__, (long unsigned int)res->start);
 	if (res)
-		release_mem_region(res->start, resource_len(res));
+		release_mem_region(res->start, resource_size(res));
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	DBG(0, "%s: release mem_region: %08lx\n", __func__, (long unsigned int)res->start);
 	if (res)
-		release_mem_region(res->start, resource_len(res));
+		release_mem_region(res->start, resource_size(res));
 
 	DBG(0, "%s: put_hcd\n", __func__);
 	usb_put_hcd(hcd);
@@ -2723,21 +2721,21 @@ static int __init isp1362_probe(struct platform_device *pdev)
 		goto err1;
 	}
 
-	if (!request_mem_region(addr->start, resource_len(addr), hcd_name)) {
+	if (!request_mem_region(addr->start, resource_size(addr), hcd_name)) {
 		retval = -EBUSY;
 		goto err1;
 	}
-	addr_reg = ioremap(addr->start, resource_len(addr));
+	addr_reg = ioremap(addr->start, resource_size(addr));
 	if (addr_reg == NULL) {
 		retval = -ENOMEM;
 		goto err2;
 	}
 
-	if (!request_mem_region(data->start, resource_len(data), hcd_name)) {
+	if (!request_mem_region(data->start, resource_size(data), hcd_name)) {
 		retval = -EBUSY;
 		goto err3;
 	}
-	data_reg = ioremap(data->start, resource_len(data));
+	data_reg = ioremap(data->start, resource_size(data));
 	if (data_reg == NULL) {
 		retval = -ENOMEM;
 		goto err4;
@@ -2795,13 +2793,13 @@ static int __init isp1362_probe(struct platform_device *pdev)
 	iounmap(data_reg);
  err4:
 	DBG(0, "%s: Releasing mem region %08lx\n", __func__, (long unsigned int)data->start);
-	release_mem_region(data->start, resource_len(data));
+	release_mem_region(data->start, resource_size(data));
  err3:
 	DBG(0, "%s: Unmapping addr_reg @ %p\n", __func__, addr_reg);
 	iounmap(addr_reg);
  err2:
 	DBG(0, "%s: Releasing mem region %08lx\n", __func__, (long unsigned int)addr->start);
-	release_mem_region(addr->start, resource_len(addr));
+	release_mem_region(addr->start, resource_size(addr));
  err1:
 	pr_err("%s: init error, %d\n", __func__, retval);
 
-- 
1.7.2




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] USB: ohci-sh - use resource_size instead of defining its own resource_len macro
  2010-10-15  5:26 [PATCH 1/3] USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro Axel Lin
  2010-10-15  5:27 ` [PATCH 2/3] USB: isp1362-hcd " Axel Lin
@ 2010-10-15  5:29 ` Axel Lin
  2010-10-15  7:58   ` Yoshihiro Shimoda
  1 sibling, 1 reply; 5+ messages in thread
From: Axel Lin @ 2010-10-15  5:29 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Brownell, Yoshihiro Shimoda, Greg Kroah-Hartman, linux-usb

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/usb/host/ohci-sh.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ohci-sh.c b/drivers/usb/host/ohci-sh.c
index 60f03cc..0b35d22 100644
--- a/drivers/usb/host/ohci-sh.c
+++ b/drivers/usb/host/ohci-sh.c
@@ -77,7 +77,6 @@ static const struct hc_driver ohci_sh_hc_driver = {
 
 /*-------------------------------------------------------------------------*/
 
-#define resource_len(r) (((r)->end - (r)->start) + 1)
 static int ohci_hcd_sh_probe(struct platform_device *pdev)
 {
 	struct resource *res = NULL;
@@ -109,7 +108,7 @@ static int ohci_hcd_sh_probe(struct platform_device *pdev)
 
 	hcd->regs = (void __iomem *)res->start;
 	hcd->rsrc_start = res->start;
-	hcd->rsrc_len = resource_len(res);
+	hcd->rsrc_len = resource_size(res);
 	ret = usb_add_hcd(hcd, irq, IRQF_DISABLED);
 	if (ret != 0) {
 		err("Failed to add hcd");
-- 
1.7.2




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/3] USB: isp1362-hcd - use resource_size instead of defining its own resource_len macro
  2010-10-15  5:27 ` [PATCH 2/3] USB: isp1362-hcd " Axel Lin
@ 2010-10-15  5:43   ` Mike Frysinger
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-10-15  5:43 UTC (permalink / raw)
  To: Axel Lin; +Cc: linux-kernel, Greg Kroah-Hartman, Lothar Wassmann, linux-usb

Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/3] USB: ohci-sh - use resource_size instead of defining its own resource_len macro
  2010-10-15  5:29 ` [PATCH 3/3] USB: ohci-sh " Axel Lin
@ 2010-10-15  7:58   ` Yoshihiro Shimoda
  0 siblings, 0 replies; 5+ messages in thread
From: Yoshihiro Shimoda @ 2010-10-15  7:58 UTC (permalink / raw)
  To: Axel Lin
  Cc: linux-kernel, David Brownell, Yoshihiro Shimoda,
	Greg Kroah-Hartman, linux-usb

Hi Axel,

2010/10/15 14:29, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  drivers/usb/host/ohci-sh.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Thank you very much for your patch.
Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Thanks,
Yoshihiro Shimoda

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-15  7:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-15  5:26 [PATCH 1/3] USB: isp116x-hcd - use resource_size instead of defining its own resource_len macro Axel Lin
2010-10-15  5:27 ` [PATCH 2/3] USB: isp1362-hcd " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox