Reorder structure members for better packing

This commit is contained in:
Gregory Nutt 2015-04-19 15:58:09 -06:00
parent 8a23c52650
commit 8c1c365ae7
2 changed files with 14 additions and 12 deletions

View File

@ -600,11 +600,13 @@ int usbhost_ctrlxfer(FAR struct usbhost_class_s *devclass,
sem_init(&xfer.done, 0, 0); sem_init(&xfer.done, 0, 0);
#ifdef CONFIG_USBHOST_HUB
if (ROOTHUB(devclass)) if (ROOTHUB(devclass))
{ {
ret = DRVR_RHCTRL(devclass->drvr, &xfer, ctrlreq); ret = DRVR_RHCTRL(devclass->drvr, &xfer, ctrlreq);
} }
else else
#endif
{ {
if ((ctrlreq->type & USB_REQ_DIR_IN) != 0) if ((ctrlreq->type & USB_REQ_DIR_IN) != 0)
{ {

View File

@ -630,18 +630,13 @@ typedef FAR void *usbhost_ep_t;
struct usbhost_class_s struct usbhost_class_s
{ {
#ifdef CONFIG_USBHOST_HUB #ifdef CONFIG_USBHOST_HUB
/* Host driver */ /* Common host driver */
struct usbhost_driver_s *drvr; FAR struct usbhost_driver_s *drvr;
/* USB device address & speed */
uint8_t addr;
uint8_t speed;
/* Parent class */ /* Parent class */
struct usbhost_class_s *parent; FAR struct usbhost_class_s *parent;
/* Control endpoint, ep0 */ /* Control endpoint, ep0 */
@ -651,13 +646,18 @@ struct usbhost_class_s
FAR struct usb_hubtt_s *tt; FAR struct usb_hubtt_s *tt;
/* Transaction translator port */
uint8_t ttport;
/* Class specific private data */ /* Class specific private data */
FAR void *priv; FAR void *priv;
/* USB device address & speed */
uint8_t addr;
uint8_t speed;
/* Transaction translator port */
uint8_t ttport;
#endif #endif
/* Provides the configuration descriptor to the class. The configuration /* Provides the configuration descriptor to the class. The configuration