[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[MiNT] [PATCH] Remove duplicate struct definitions
Alan please commit this patch.
Thanks!
Commit message:
interface and config descriptors are already defined in usb.h, so
remove them in ehci.h.
Index: sys/usb/src.km/ucd/ehci/ehci-hcd.c
===================================================================
RCS file: /mint/freemint/sys/usb/src.km/ucd/ehci/ehci-hcd.c,v
retrieving revision 1.1
diff -u -8 -r1.1 ehci-hcd.c
--- sys/usb/src.km/ucd/ehci/ehci-hcd.c 30 Apr 2014 19:59:29 -0000 1.1
+++ sys/usb/src.km/ucd/ehci/ehci-hcd.c 1 May 2014 10:11:33 -0000
@@ -117,18 +117,18 @@
/*
* Structures
*/
struct descriptor {
struct usb_hub_descriptor hub;
struct usb_device_descriptor device;
- struct usb_linux_config_descriptor config;
- struct usb_linux_interface_descriptor interface;
+ struct usb_config_descriptor config;
+ struct usb_interface_descriptor interface;
struct usb_endpoint_descriptor endpoint;
} __attribute__ ((packed));
static struct descriptor rom_descriptor = {
{
0x8, /* bDescLength */
0x29, /* bDescriptorType: hub descriptor */
2, /* bNrPorts -- runtime modified */
Index: sys/usb/src.km/ucd/ehci/ehci.h
===================================================================
RCS file: /mint/freemint/sys/usb/src.km/ucd/ehci/ehci.h,v
retrieving revision 1.1
diff -u -8 -r1.1 ehci.h
--- sys/usb/src.km/ucd/ehci/ehci.h 30 Apr 2014 19:59:29 -0000 1.1
+++ sys/usb/src.km/ucd/ehci/ehci.h 1 May 2014 10:11:33 -0000
@@ -97,41 +97,16 @@
} __attribute__ ((packed));
#define USBMODE 0x68 /* USB Device mode */
#define USBMODE_SDIS (1 << 3) /* Stream disable */
#define USBMODE_BE (1 << 2) /* BE/LE endiannes select */
#define USBMODE_CM_HC (3 << 0) /* host controller mode */
#define USBMODE_CM_IDLE (0 << 0) /* idle state */
-/* Interface descriptor */
-struct usb_linux_interface_descriptor {
- unsigned char bLength;
- unsigned char bDescriptorType;
- unsigned char bInterfaceNumber;
- unsigned char bAlternateSetting;
- unsigned char bNumEndpoints;
- unsigned char bInterfaceClass;
- unsigned char bInterfaceSubClass;
- unsigned char bInterfaceProtocol;
- unsigned char iInterface;
-} __attribute__ ((packed));
-
-/* Configuration descriptor information.. */
-struct usb_linux_config_descriptor {
- unsigned char bLength;
- unsigned char bDescriptorType;
- unsigned short wTotalLength;
- unsigned char bNumInterfaces;
- unsigned char bConfigurationValue;
- unsigned char iConfiguration;
- unsigned char bmAttributes;
- unsigned char MaxPower;
-} __attribute__ ((packed));
-
#if defined CONFIG_EHCI_DESC_BIG_ENDIAN
#define ehci_readl(x) (*((volatile unsigned long *)(x)))
#define ehci_writel(a, b) (*((volatile unsigned long *)(a)) = ((volatile unsigned long)b))
#else
#define ehci_readl(x) le2cpu32((*((volatile unsigned long *)(x))))
#define ehci_writel(a, b) (*((volatile unsigned long *)(a)) = cpu2le32(((volatile unsigned long)b)))
#endif