Hi, On Thu, Mar 07, 2013 at 12:58:04AM +0000, Paul Zimmerman wrote: > > From: Felipe Balbi [mailto:balbi@xxxxxx] > > Sent: Tuesday, March 05, 2013 11:42 PM > > On Mon, Mar 04, 2013 at 12:21:44PM -0800, Paul Zimmerman wrote: > > > > > > +const char *usb_otg_state_string(enum usb_otg_state state) > > > +{ > > > + static const char *const names[] = { > > > + [OTG_STATE_UNDEFINED] = "UNDEFINED", > > > + [OTG_STATE_B_IDLE] = "b_idle", > > > + [OTG_STATE_B_SRP_INIT] = "b_srp_init", > > > + [OTG_STATE_B_PERIPHERAL] = "b_peripheral", > > > + [OTG_STATE_B_WAIT_ACON] = "b_wait_acon", > > > + [OTG_STATE_B_HOST] = "b_host", > > > + [OTG_STATE_A_IDLE] = "a_idle", > > > + [OTG_STATE_A_WAIT_VRISE] = "a_wait_vrise", > > > + [OTG_STATE_A_WAIT_BCON] = "a_wait_bcon", > > > + [OTG_STATE_A_HOST] = "a_host", > > > + [OTG_STATE_A_SUSPEND] = "a_suspend", > > > + [OTG_STATE_A_PERIPHERAL] = "a_peripheral", > > > + [OTG_STATE_A_WAIT_VFALL] = "a_wait_vfall", > > > + [OTG_STATE_A_VBUS_ERR] = "a_vbus_err", > > > + }; > > > + > > > + if (state < 0 || state >= ARRAY_SIZE(names)) > > > + state = OTG_STATE_UNDEFINED; > > > + return names[state]; > > > +} > > > +EXPORT_SYMBOL_GPL(usb_otg_state_string); > > > > just now I remembered that we already have this routing in > > drivers/usb/otg/otg.c. It would be better to that to usb common and fix > > the users. > > Hi Felipe, > > How about if we take this patch, and then in a separate patch series > convert all the callers of otg_state_string() to use this function > instead, and then remove otg_state_string()? Otherwise my patch > series would have to wait till that is done. it doesn't have to wait, that's quite enough to do. If you want I can do it and you just build on top. -- balbi
Attachment:
signature.asc
Description: Digital signature