diff options
author | Thomas Huth <thuth@redhat.com> | 2016-08-02 11:19:40 +0200 |
---|---|---|
committer | Alexey Kardashevskiy <aik@ozlabs.ru> | 2016-08-03 13:48:17 +1000 |
commit | 6ea7b81d160da669a22100e5a0e79a266503ade4 (patch) | |
tree | 8f42e05d919c42e66a8219f82ee2f97c16881de8 /lib/libusb | |
parent | 86f9e539ef87dcaa2396b18f41d2b90c52b23376 (diff) | |
download | SLOF-6ea7b81d160da669a22100e5a0e79a266503ade4.zip SLOF-6ea7b81d160da669a22100e5a0e79a266503ade4.tar.gz SLOF-6ea7b81d160da669a22100e5a0e79a266503ade4.tar.bz2 |
usb: Move XHCI port state arrays from header to .c file
Arrays should not be declared in a header (to avoid that it gets
declared multiple times when the header is included more than once),
so the ps_array_usbX settings should reside in the .c file instead.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Diffstat (limited to 'lib/libusb')
-rw-r--r-- | lib/libusb/usb-xhci.c | 17 | ||||
-rw-r--r-- | lib/libusb/usb-xhci.h | 18 |
2 files changed, 17 insertions, 18 deletions
diff --git a/lib/libusb/usb-xhci.c b/lib/libusb/usb-xhci.c index a3e9adc..b59fd40 100644 --- a/lib/libusb/usb-xhci.c +++ b/lib/libusb/usb-xhci.c @@ -25,6 +25,23 @@ #define dprintf(_x ...) #endif +struct port_state ps_array_usb2[] = { + {1, 0, 0, 0, PORTSC_PLS_U0, "ERROR"} +}; + +struct port_state ps_array_usb3[] = { + {0, 0, 0, 0, PORTSC_PLS_DISABLED, "Powered-OFF"}, + {1, 0, 0, 0, PORTSC_PLS_POLLING, "Polling"}, + {1, 0, 0, 0, PORTSC_PLS_U0, "Polling"}, + {1, 0, 0, 0, PORTSC_PLS_RXDETECT, "*** Disconnected ***"}, + {1, 0, 0, 0, PORTSC_PLS_DISABLED, "Disabled"}, + {1, 0, 0, 0, PORTSC_PLS_INACTIVE, "Error"}, + {1, 0, 0, 0, PORTSC_PLS_TEST_MODE,"Loopback"}, + {1, 0, 0, 0, PORTSC_PLS_COMP_MODE,"Compliancek"}, + {1, 1, 0, 1, PORTSC_PLS_U0, "****** Reset ******"}, + {1, 1, 1, 0, PORTSC_PLS_U0, "****** Enabled ******"}, +}; + static void dump_xhci_regs(struct xhci_hcd *xhcd) { #ifdef XHCI_DEBUG diff --git a/lib/libusb/usb-xhci.h b/lib/libusb/usb-xhci.h index 8172a37..b02fcbf 100644 --- a/lib/libusb/usb-xhci.h +++ b/lib/libusb/usb-xhci.h @@ -101,24 +101,6 @@ struct port_state { char *state; }; - -struct port_state ps_array_usb2[] = { - {1, 0, 0, 0, PORTSC_PLS_U0, "ERROR"} -}; - -struct port_state ps_array_usb3[] = { - {0, 0, 0, 0, PORTSC_PLS_DISABLED, "Powered-OFF"}, - {1, 0, 0, 0, PORTSC_PLS_POLLING, "Polling"}, - {1, 0, 0, 0, PORTSC_PLS_U0, "Polling"}, - {1, 0, 0, 0, PORTSC_PLS_RXDETECT, "*** Disconnected ***"}, - {1, 0, 0, 0, PORTSC_PLS_DISABLED, "Disabled"}, - {1, 0, 0, 0, PORTSC_PLS_INACTIVE, "Error"}, - {1, 0, 0, 0, PORTSC_PLS_TEST_MODE,"Loopback"}, - {1, 0, 0, 0, PORTSC_PLS_COMP_MODE,"Compliancek"}, - {1, 1, 0, 1, PORTSC_PLS_U0, "****** Reset ******"}, - {1, 1, 1, 0, PORTSC_PLS_U0, "****** Enabled ******"}, -}; - /* 5.4 Host Controller Operational Registers * Table 26 */ |