public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2.6.20-rc5-omap] musb_hdrc, otg_state_string tweak
@ 2007-01-18 12:05 David Brownell
  2007-01-18 22:21 ` tony
  0 siblings, 1 reply; 2+ messages in thread
From: David Brownell @ 2007-01-18 12:05 UTC (permalink / raw)
  To: linux-omap-open-source, tony

This provides a trivial definition of otg_state_string() for use
in various WARNING() messages when debugging is not enabled.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

Index: o26/drivers/usb/musb/plat_uds.c
===================================================================
--- o26.orig/drivers/usb/musb/plat_uds.c	2007-01-18 03:06:34.000000000 -0800
+++ o26/drivers/usb/musb/plat_uds.c	2007-01-18 03:11:35.000000000 -0800
@@ -122,6 +122,15 @@ module_param(debug, uint, 0);
 MODULE_PARM_DESC(debug, "initial debug message level");
 
 #define MUSB_VERSION_SUFFIX	"/dbg"
+#else
+
+const char *otg_state_string(struct musb *musb)
+{
+	static char buf[8];
+
+	snprintf(buf, sizeof buf, "otg-%d", musb->xceiv.state);
+	return buf;
+}
 #endif
 
 #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia"

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

* Re: [patch 2.6.20-rc5-omap] musb_hdrc, otg_state_string tweak
  2007-01-18 12:05 [patch 2.6.20-rc5-omap] musb_hdrc, otg_state_string tweak David Brownell
@ 2007-01-18 22:21 ` tony
  0 siblings, 0 replies; 2+ messages in thread
From: tony @ 2007-01-18 22:21 UTC (permalink / raw)
  To: David Brownell; +Cc: linux-omap-open-source

* David Brownell <david-b@pacbell.net> [070118 04:06]:
> This provides a trivial definition of otg_state_string() for use
> in various WARNING() messages when debugging is not enabled.
> 
> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
> 
> Index: o26/drivers/usb/musb/plat_uds.c
> ===================================================================
> --- o26.orig/drivers/usb/musb/plat_uds.c	2007-01-18 03:06:34.000000000 -0800
> +++ o26/drivers/usb/musb/plat_uds.c	2007-01-18 03:11:35.000000000 -0800
> @@ -122,6 +122,15 @@ module_param(debug, uint, 0);
>  MODULE_PARM_DESC(debug, "initial debug message level");
>  
>  #define MUSB_VERSION_SUFFIX	"/dbg"
> +#else
> +
> +const char *otg_state_string(struct musb *musb)
> +{
> +	static char buf[8];
> +
> +	snprintf(buf, sizeof buf, "otg-%d", musb->xceiv.state);
> +	return buf;
> +}
>  #endif
>  
>  #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia"

Pushed.

Tony

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

end of thread, other threads:[~2007-01-18 22:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-18 12:05 [patch 2.6.20-rc5-omap] musb_hdrc, otg_state_string tweak David Brownell
2007-01-18 22:21 ` tony

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