Re: [PATCH v2 06/11] usb: musb: factor out hcd initalization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>>> "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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux