mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: [PATCH 06/10] USB: EHCI: reuse ch9.h config and interface descriptors
Date: Wed, 23 Jul 2014 15:51:47 +0200	[thread overview]
Message-ID: <1406123512-26489-7-git-send-email-sebastian.hesselbarth@gmail.com> (raw)
In-Reply-To: <1406123512-26489-1-git-send-email-sebastian.hesselbarth@gmail.com>

Now that usb_config_descriptor and usb_interface_descriptor are clean
of any additional fields, drop the duplication in EHCI code and use
the default ones.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
---
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
---
 drivers/usb/host/ehci-hcd.c |  4 ++--
 drivers/usb/host/ehci.h     | 25 -------------------------
 2 files changed, 2 insertions(+), 27 deletions(-)

diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 9e30deb419cc..7857576738d7 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -57,8 +57,8 @@ struct ehci_priv {
 static 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)) descriptor = {
 	{
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h
index b1e768b49304..8cc477aa4ffe 100644
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -68,31 +68,6 @@ struct ehci_hcor {
 #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 u32 *)(x)))
 #define ehci_writel(a, b)	(*((volatile u32 *)(a)) = ((volatile u32)b))
-- 
2.0.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-07-23 13:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 13:51 [PATCH 00/10] More USB cleanup and fixes Sebastian Hesselbarth
2014-07-23 13:51 ` [PATCH 01/10] USB: import ch11.h from Linux Sebastian Hesselbarth
2014-07-23 13:51 ` [PATCH 02/10] USB: reduce USB_MAXCHILDREN on imported ch11.h Sebastian Hesselbarth
2014-07-23 13:51 ` [PATCH 03/10] USB: fixup usb_hub_descriptor length name Sebastian Hesselbarth
2014-07-23 13:51 ` [PATCH 04/10] USB: fix PowerPowerCtrlMask assignment Sebastian Hesselbarth
2014-07-23 13:51 ` [PATCH 05/10] USB: Move FooRequest defines and add class requests Sebastian Hesselbarth
2014-07-23 13:51 ` Sebastian Hesselbarth [this message]
2014-07-23 13:51 ` [PATCH 07/10] USB: EHCI: make use of defines for descriptors Sebastian Hesselbarth
2014-07-23 13:51 ` [PATCH 08/10] USB: EHCI: use descriptor length fields Sebastian Hesselbarth
2014-07-23 13:51 ` [PATCH 09/10] USB: Use descriptors from ch11.h Sebastian Hesselbarth
2014-07-23 13:51 ` [PATCH 10/10] USB: remove redundant defines from usb_defs.h Sebastian Hesselbarth
2014-07-24  7:05 ` [PATCH 00/10] More USB cleanup and fixes Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406123512-26489-7-git-send-email-sebastian.hesselbarth@gmail.com \
    --to=sebastian.hesselbarth@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox