>>>>> "Daniel" == Daniel Mack <zonque@xxxxxxxxx> writes: Daniel> The musb struct is currently allocated along with the hcd, Daniel> which makes it difficult to build a driver that only acts as Daniel> gadget device. Daniel> Fix this by allocating musb directly, and keep the hcd around as Daniel> a pointer in the musb struct. Daniel> struct hc_driver musb_hc_driver can now also be static to Daniel> musb_host.c, and the macro musb_to_hcd() is just a pointer Daniel> dereferencer for now, and will be elminiated later. s/elminiated/eliminated/ Daniel> Signed-off-by: Daniel Mack <zonque@xxxxxxxxx> Daniel> +++ b/drivers/usb/musb/musb_host.h Daniel> @@ -37,15 +37,9 @@ Daniel> #include <linux/scatterlist.h> Daniel> -static inline struct usb_hcd *musb_to_hcd(struct musb *musb) Daniel> -{ Daniel> - return container_of((void *) musb, struct usb_hcd, hcd_priv); Daniel> -} Daniel> +#define musb_to_hcd(MUSB) ((MUSB)->hcd) I dislike the capitals, but as it's going away later: Acked-by: Peter Korsgaard <jacmet@xxxxxxxxxx> -- Bye, Peter Korsgaard -- 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