mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] usb: fix driver name
@ 2012-04-23  6:22 Jean-Christophe PLAGNIOL-VILLARD
  2012-04-23  6:22 ` [PATCH 2/2] menu: fix non command management support Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 1 reply; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-04-23  6:22 UTC (permalink / raw)
  To: barebox

use the usb_driver name

otherwise we will have a NULL driver entry in devinfo

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/usb/core/usb.c    |    1 +
 drivers/usb/storage/usb.c |    1 -
 2 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index ba23e0e..bd2938d 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -1275,6 +1275,7 @@ static int usb_hub_probe(struct usb_device *dev, int ifnum)
 
 int usb_driver_register(struct usb_driver *drv)
 {
+	drv->driver.name = drv->name;
 	drv->driver.bus = &usb_bus_type;
 	return register_driver(&drv->driver);
 }
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 5f15464..fa3691a 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -621,7 +621,6 @@ static struct usb_driver usb_storage_driver = {
 
 static int __init usb_stor_init(void)
 {
-	usb_storage_driver.name = usb_storage_driver.driver.name;
 	return usb_driver_register(&usb_storage_driver);
 }
 device_initcall(usb_stor_init);
-- 
1.7.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

* [PATCH 2/2] menu: fix non command management support
  2012-04-23  6:22 [PATCH 1/2] usb: fix driver name Jean-Christophe PLAGNIOL-VILLARD
@ 2012-04-23  6:22 ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 2+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-04-23  6:22 UTC (permalink / raw)
  To: barebox

the auto select is always available

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 commands/menu.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/commands/menu.c b/commands/menu.c
index e5ce5a9..8833d74 100644
--- a/commands/menu.c
+++ b/commands/menu.c
@@ -41,14 +41,14 @@ typedef enum {
 struct cmd_menu {
 	char		*menu;
 	menu_action	action;
+	char		*description;
+	int		auto_select;
 #if defined(CONFIG_CMD_MENU_MANAGEMENT)
 	int		entry;
 	int		re_entrant;
-	char		*description;
 	char		*command;
 	char		*submenu;
 	int		num;
-	int		auto_select;
 	menu_entry_type	type;
 	int		box_state;
 #endif
@@ -58,7 +58,7 @@ struct cmd_menu {
 #define OPTS		"m:earlc:d:RsSn:u:A:b:B:"
 #define	is_entry(x)	((x)->entry)
 #else
-#define OPTS		"m:ls"
+#define OPTS		"m:lsA:d:"
 #define	is_entry(x)	(0)
 #endif
 
@@ -334,6 +334,12 @@ static int do_menu(int argc, char *argv[])
 		case 's':
 			cm.action = action_show;
 			break;
+		case 'A':
+			cm.auto_select = simple_strtoul(optarg, NULL, 10);
+			break;
+		case 'd':
+			cm.description = optarg;
+			break;
 #if defined(CONFIG_CMD_MENU_MANAGEMENT)
 		case 'e':
 			cm.entry = 1;
@@ -350,9 +356,6 @@ static int do_menu(int argc, char *argv[])
 		case 'u':
 			cm.submenu = optarg;
 			break;
-		case 'd':
-			cm.description = optarg;
-			break;
 		case 'R':
 			cm.re_entrant = 1;
 			break;
@@ -362,8 +365,6 @@ static int do_menu(int argc, char *argv[])
 		case 'n':
 			cm.num = simple_strtoul(optarg, NULL, 10);
 			break;
-		case 'A':
-			cm.auto_select = simple_strtoul(optarg, NULL, 10);
 		case 'b':
 			cm.type = MENU_ENTRY_BOX;
 			cm.box_state = simple_strtoul(optarg, NULL, 10);
-- 
1.7.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2012-04-23  6:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-23  6:22 [PATCH 1/2] usb: fix driver name Jean-Christophe PLAGNIOL-VILLARD
2012-04-23  6:22 ` [PATCH 2/2] menu: fix non command management support Jean-Christophe PLAGNIOL-VILLARD

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