These patches are against kernels 2.6.18 through at least 2.6.18-git7.
patch 4: modes ehci_iso_sched funtions to one place. Trivial patch
that makes no funcitonal difference.
Signed-off-by: Christopher "Monty" Montgomery <[EMAIL PROTECTED]>
---
diff -X b/Documentation/dontdiff -upr a/drivers/usb/host/ehci-sched.c
b/drivers/usb/host/ehci-sched.c
--- a/drivers/usb/host/ehci-sched.c 2006-09-26 22:19:16.000000000 -0400
+++ b/drivers/usb/host/ehci-sched.c 2006-09-26 22:19:26.000000000 -0400
@@ -939,6 +939,36 @@ done:
}
/*-------------------------------------------------------------------------*/
+/* ISO scheduling temporary structure machinery necessitated by lazy
+ alloc of the iso_stream structure */
+
+static struct ehci_iso_sched *
+iso_sched_alloc (unsigned packets, gfp_t mem_flags)
+{
+ struct ehci_iso_sched *iso_sched;
+ int size = sizeof *iso_sched;
+
+ size += packets * sizeof (struct ehci_iso_packet);
+ iso_sched = kzalloc(size, mem_flags);
+ if (likely (iso_sched != NULL)) {
+ INIT_LIST_HEAD (&iso_sched->td_list);
+ }
+ return iso_sched;
+}
+
+static void
+iso_sched_free (struct ehci_iso_stream *stream,
+ struct ehci_iso_sched *iso_sched)
+{
+ if (!iso_sched){
+ return;
+ }
+ // caller must hold ehci->lock!
+ list_splice (&iso_sched->td_list, &stream->free_list);
+ kfree (iso_sched);
+}
+
+/*-------------------------------------------------------------------------*/
/* ehci_iso_stream ops work with both ITD and SITD */
@@ -1164,24 +1194,6 @@ iso_stream_find (struct ehci_hcd *ehci,
return stream;
}
-/*-------------------------------------------------------------------------*/
-
-/* ehci_iso_sched ops can be ITD-only or SITD-only */
-
-static struct ehci_iso_sched *
-iso_sched_alloc (unsigned packets, gfp_t mem_flags)
-{
- struct ehci_iso_sched *iso_sched;
- int size = sizeof *iso_sched;
-
- size += packets * sizeof (struct ehci_iso_packet);
- iso_sched = kzalloc(size, mem_flags);
- if (likely (iso_sched != NULL)) {
- INIT_LIST_HEAD (&iso_sched->td_list);
- }
- return iso_sched;
-}
-
static inline void
itd_sched_init (
struct ehci_iso_sched *iso_sched,
@@ -1223,19 +1235,6 @@ itd_sched_init (
}
}
-static void
-iso_sched_free (
- struct ehci_iso_stream *stream,
- struct ehci_iso_sched *iso_sched
-)
-{
- if (!iso_sched)
- return;
- // caller must hold ehci->lock!
- list_splice (&iso_sched->td_list, &stream->free_list);
- kfree (iso_sched);
-}
-
static int
itd_urb_transaction (
struct ehci_iso_stream *stream,
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel