* [PATCH] usb: OHCI/EHCI Use resource_size function
@ 2011-11-08 18:49 Thomas Meyer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Meyer @ 2011-11-08 18:49 UTC (permalink / raw)
To: Alan Stern, Greg Kroah-Hartman, linux-usb, linux-kernel
From: Thomas Meyer <thomas@m3y3r.de>
Use resource_size function on resource object
instead of explicit computation.
The semantic patch that makes this change is available
in scripts/coccinelle/api/resource_size.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/usb/host/ehci-xls.c b/drivers/usb/host/ehci-xls.c
--- a/drivers/usb/host/ehci-xls.c 2011-11-07 19:38:15.387035265 +0100
+++ b/drivers/usb/host/ehci-xls.c 2011-11-08 12:13:30.675915786 +0100
@@ -69,7 +69,7 @@ int ehci_xls_probe_internal(const struct
}
hcd->rsrc_start = res->start;
- hcd->rsrc_len = res->end - res->start + 1;
+ hcd->rsrc_len = resource_size(res);
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
driver->description)) {
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] usb: OHCI/EHCI Use resource_size function
@ 2011-11-08 18:50 Thomas Meyer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Meyer @ 2011-11-08 18:50 UTC (permalink / raw)
To: Alan Stern, Greg Kroah-Hartman, open list:USB OHCI DRIVER, open list
From: Thomas Meyer <thomas@m3y3r.de>
Use resource_size function on resource object
instead of explicit computation.
The semantic patch that makes this change is available
in scripts/coccinelle/api/resource_size.cocci.
More information about semantic patching is available at
http://coccinelle.lip6.fr/
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
---
diff -u -p a/drivers/usb/host/ohci-xls.c b/drivers/usb/host/ohci-xls.c
--- a/drivers/usb/host/ohci-xls.c 2011-11-07 19:38:15.467036480 +0100
+++ b/drivers/usb/host/ohci-xls.c 2011-11-08 12:13:16.922398086 +0100
@@ -40,7 +40,7 @@ static int ohci_xls_probe_internal(const
goto err1;
}
hcd->rsrc_start = res->start;
- hcd->rsrc_len = res->end - res->start + 1;
+ hcd->rsrc_len = resource_size(res);
if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
driver->description)) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-08 19:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-08 18:49 [PATCH] usb: OHCI/EHCI Use resource_size function Thomas Meyer
2011-11-08 18:50 Thomas Meyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome