All of lore.kernel.org
 help / color / mirror / Atom feed
* Proposed patch for usb-gadget
@ 2009-11-18  9:42 Tasslehoff Kjappfot
  2009-11-18  9:48 ` Phil Blundell
  0 siblings, 1 reply; 5+ messages in thread
From: Tasslehoff Kjappfot @ 2009-11-18  9:42 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 129 bytes --]

usb-gadget failed when MODULE_OPTIONS contained more than one option. Here's
the patch I used to make it work.

- Tasslehoff

[-- Attachment #2: 0001-fix-usage-of-MODULE_OPTIONS-in-modprobe.patch --]
[-- Type: text/x-patch, Size: 1488 bytes --]

From ae6d9906bd4bfb5c064cdc12c4147e95a0e51669 Mon Sep 17 00:00:00 2001
Date: Wed, 18 Nov 2009 10:28:28 +0100
Subject: [PATCH] fix usage of MODULE_OPTIONS in modprobe

---
 usb-gadget |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/usb-gadget b/usb-gadget
index 3f25edc..8da88ad 100755
--- a/usb-gadget
+++ b/usb-gadget
@@ -23,16 +23,16 @@ go() {
 	test -e "$CONF_FILE" && . "$CONF_FILE" 
 	
 	case "$USB_MODE" in
-	networking)	setup_usb g_ether "$MODULE_OPTIONS" ;;
-	zero)		setup_usb g_zero "$MODULE_OPTIONS" ;;
-	midi)		setup_usb g_midi "$MODULE_OPTIONS" ;;
-	printer)	setup_usb g_printer "$MODULE_OPTIONS" ;;
-	gadgetfs) 	setup_usb gadgetfs "$MODULE_OPTIONS" ;;
-	composite)	setup_usb g_cdc "$MODULE_OPTIONS" ;;
-	serial)		setup_usb g_serial "$MODULE_OPTIONS" ;;
-	storage)	setup_usb g_file_storage "$MODULE_OPTIONS" ;;
+	networking)	setup_usb g_ether ;;
+	zero)		setup_usb g_zero ;;
+	midi)		setup_usb g_midi ;;
+	printer)	setup_usb g_printer ;;
+	gadgetfs) 	setup_usb gadgetfs ;;
+	composite)	setup_usb g_cdc ;;
+	serial)		setup_usb g_serial ;;
+	storage)	setup_usb g_file_storage ;;
 	hostmode)	unload_usb_gadgets
-			setup_usb ohci_hcd "$MODULE_OPTIONS" ;;
+			setup_usb ohci_hcd ;;
 	none)		unload_usb_gadgets ;;
 	esac		
 		
@@ -44,7 +44,7 @@ setup_usb() {
 	then
 		unload_usb_gadgets
 		echo "Loading [$1]"
-		modprobe "$1" "$MODULE_OPTIONS"
+		modprobe "$1" $MODULE_OPTIONS
 	else
 		echo "Already loaded: [$1]"
 	fi
-- 
1.6.3.3


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

end of thread, other threads:[~2010-02-16  8:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-18  9:42 Proposed patch for usb-gadget Tasslehoff Kjappfot
2009-11-18  9:48 ` Phil Blundell
2009-11-18  9:56   ` Tasslehoff
2009-11-18 10:22     ` Phil Blundell
2010-02-16  8:06       ` Stefan Schmidt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.