On Thu, 26 May 2011 18:27:27 +0200, Sebastian Andrzej Siewior wrote:
After looking at this, I would prefer it keep it the way it is now and change it later on.
Kk.
The udc driver keeps pointer to the gadget driver for ->setup() and other callbacks. The udc driver also setups a struct device of its own. So with this udc class we have two of them.
Which brings an obvious question of whether we need two of them.
That means I would like to stash it in a different way: struct usb_udc { struct device dev; struct list_head list; struct usb_gadget gadget; }; and struct usb_gadget_driver could be probably accessed from within "struct usb_gadget". Since every udc can only have one gadget driver.
That seems reasonable to me.
So that is how I would like change it. Having it organized as I suggested will make it easier to send small patches and change one thing at a time. Right now the last patch will be big enough and it will make "only" usage of this facility in one go (gadget drivers and function drivers) in order to break bisect.
Kk. -- Best regards, _ _ .o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o ..o | Computer Science, Michal "mina86" Nazarewicz (o o) ooo +-----<email/xmpp: mnazarewicz@xxxxxxxxxx>-----ooO--(_)--Ooo-- -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html