On 10.04.2013 21:15, Peter Korsgaard wrote: >>>>>> "Daniel" == Daniel Mack <zonque@xxxxxxxxx> writes: > > Hi, > > Daniel> +struct musb_hcd_link { > Daniel> + struct musb *musb; > Daniel> +}; > Daniel> + > Daniel> +struct musb *hcd_to_musb(struct usb_hcd *hcd) > Daniel> +{ > Daniel> + struct musb_hcd_link *link = (struct musb_hcd_link *) hcd->hcd_priv; > Daniel> + return link->musb; > Daniel> +} > Daniel> + > >> > >> Sorry, I missed this first time around - But why the indirection with > >> musb_hcd_link? Why not simply directly store a pointer to struct musb in > >> hcd_priv? > > Daniel> Well, that's also possible. I just thought it's nicer (more readable) > Daniel> that way. But I can as well rework it so the struct isn't needed. It > Daniel> won't safe us any binary size or anything though. So I'm not sure. > > Well, it will save one level of indirection (hcd_priv->link->musb vs > hcd_priv->musb). > > Daniel> Any particular reason why you don't like the struct? :) > > Just that it's an unneeded extra level of indirection. > Ok, alright. Sent v4 right now. Thanks for your feedback! Much appreciated. Btw - did you try that on your board yet? Does it work for you as well? Daniel -- 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