Skip to contentSkip to conversation

usb: Use resource_size function

PATCH In review Paul Vlase 2 participants 2 messages Mar 10, 2013 – Mar 11, 2013

Subsystems (2)
lore
Share & tools
lore

Paul Vlase

author
#0 lore raw

PATCH 1/1 usb: Use resource_size function

---
 drivers/usb/host/ehci-mv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ehci-mv.c +1 -1
index 3065809..5cd9f96 100644
@@ -225,7 +225,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
 		(void __iomem *) ((unsigned long) ehci_mv->cap_regs + offset);
 
 	hcd->rsrc_start = r->start;
-	hcd->rsrc_len = r->end - r->start + 1;
+	hcd->rsrc_len = resource_size(r);
 	hcd->regs = ehci_mv->op_regs;
 
 	hcd->irq = platform_get_irq(pdev, 0);
Signature · 1 line
1.7.10.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Paul Vlase
---
 drivers/usb/host/ehci-mv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ehci-mv.c +0 -0
index 3065809..5cd9f96 100644

drivers/usb/host/ehci-mv.c static int mv_ehci_probe(struct platform_device *pdev) · line 231

Quoted 8 lines
drivers/usb/host/ehci-mv.c +1 -1
@@ -225,7 +225,7 @@ static int mv_ehci_probe(struct platform_device *pdev)
 		(void __iomem *) ((unsigned long) ehci_mv->cap_regs + offset);
 
 	hcd->rsrc_start = r->start;
-	hcd->rsrc_len = r->end - r->start + 1;
+	hcd->rsrc_len = resource_size(r);
 	hcd->regs = ehci_mv->op_regs;
 
 	hcd->irq = platform_get_irq(pdev, 0);