mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 07/11] usbnet: remove unused dev member in struct usbnet
Date: Thu, 24 Jun 2010 11:39:12 +0200	[thread overview]
Message-ID: <1277372356-32370-8-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1277372356-32370-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/net/usb/asix.c   |   12 ++++++------
 drivers/net/usb/usbnet.c |    9 +++++----
 include/usb/usbnet.h     |    2 --
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/net/usb/asix.c b/drivers/net/usb/asix.c
index fc4146f..ca71b34 100644
--- a/drivers/net/usb/asix.c
+++ b/drivers/net/usb/asix.c
@@ -415,13 +415,13 @@ static int asix_rx_fixup(struct usbnet *dev, void *buf, int len)
 
 	while (len > 0) {
 		if ((short)(header & 0x0000ffff) != ~((short)((header & 0xffff0000) >> 16)))
-			dev_err(&dev->dev, "asix_rx_fixup() Bad Header Length");
-	
+			dev_err(&dev->edev.dev, "asix_rx_fixup() Bad Header Length");
+
 		/* get the packet length */
 		size = (unsigned short) (header & 0x0000ffff);
 
 		if (size > 1514) {
-			dev_err(&dev->dev, "asix_rx_fixup() Bad RX Length %d", size);
+			dev_err(&dev->edev.dev, "asix_rx_fixup() Bad RX Length %d", size);
 			return 0;
 		}
 
@@ -440,7 +440,7 @@ static int asix_rx_fixup(struct usbnet *dev, void *buf, int len)
 	}
 
 	if (len < 0) {
-		dev_err(&dev->dev,"asix_rx_fixup() Bad SKB Length %d", len);
+		dev_err(&dev->edev.dev,"asix_rx_fixup() Bad SKB Length %d", len);
 		return -1;
 	}
 	return 0;
@@ -503,13 +503,13 @@ static int ax88172_bind(struct usbnet *dev)
 	unsigned long gpio_bits = dev->driver_info->data;
 	struct asix_data *data = (struct asix_data *)&dev->data;
 
-	dev_dbg(&dev->dev, "%s\n", __func__);
+	dev_dbg(&dev->edev.dev, "%s\n", __func__);
 
 	data->eeprom_len = AX88172_EEPROM_LEN;
 
 	ret = usbnet_get_endpoints(dev);
 	if (ret) {
-		dev_err(&dev->dev, "can not get EPs\n");
+		dev_err(&dev->edev.dev, "can not get EPs\n");
 		return ret;
 	}
 
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index b0e3090..cc170f6 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -74,7 +74,7 @@ int usbnet_get_endpoints(struct usbnet *dev)
 			in->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
 	dev->out = usb_sndbulkpipe (dev->udev,
 			out->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK);
-	dev_dbg(&dev->dev, "found endpoints: IN=%d OUT=%d\n",
+	dev_dbg(&dev->edev.dev, "found endpoints: IN=%d OUT=%d\n",
 			in->bEndpointAddress, out->bEndpointAddress);
 
 	return 0;
@@ -89,14 +89,14 @@ static int usbnet_send(struct eth_device *edev, void *eth_data, int data_length)
 	struct driver_info	*info = dev->driver_info;
 	int			len, alen, ret;
 
-	dev_dbg(&dev->dev, "%s\n",__func__);
+	dev_dbg(&edev->dev, "%s\n",__func__);
 
 	/* some devices want funky USB-level framing, for
 	 * win32 driver (usually) and/or hardware quirks
 	 */
         if(info->tx_fixup) {
                 if(info->tx_fixup(dev, eth_data, data_length, tx_buffer, &len)) {
-                        dev_dbg(&dev->dev, "can't tx_fixup packet");
+			dev_dbg(&edev->dev, "can't tx_fixup packet");
                         return 0;
                 }
         } else {
@@ -191,7 +191,7 @@ int usbnet_probe(struct usb_device *usbdev, const struct usb_device_id *prod)
 	struct driver_info *info;
 	int status;
 
-	dev_dbg(&edev->dev, "%s\n", __func__);
+	dev_dbg(&usbdev->dev, "%s\n", __func__);
 
 	undev = xzalloc(sizeof (*undev));
 
@@ -206,6 +206,7 @@ int usbnet_probe(struct usb_device *usbdev, const struct usb_device_id *prod)
 	edev->recv = usbnet_recv,
 	edev->halt = usbnet_halt,
 	edev->priv = undev;
+	edev->dev = usbdev->dev; /* will be overwritten by eth_register */
 
 	info = (struct driver_info *)prod->driver_info;
 	undev->driver_info = info;
diff --git a/include/usb/usbnet.h b/include/usb/usbnet.h
index 77f1960..e3ea373 100644
--- a/include/usb/usbnet.h
+++ b/include/usb/usbnet.h
@@ -54,8 +54,6 @@ struct usbnet {
 #		define EVENT_RX_MEMORY	2
 #		define EVENT_STS_SPLIT	3
 #		define EVENT_LINK_RESET	4
-	/* FIXME: Our eth_device should have this, not us! */
-	struct device_d dev;
 };
 
 #if 0
-- 
1.7.1


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

  parent reply	other threads:[~2010-06-24  9:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24  9:39 assorted patches Sascha Hauer
2010-06-24  9:39 ` [PATCH 01/11] i.MX27: merge iomux pim definitions from kernel Sascha Hauer
2010-06-24  9:39 ` [PATCH 02/11] imxfb: Add board specific hook to enable display Sascha Hauer
2010-06-24  9:39 ` [PATCH 03/11] imxfb: do not enable framebuffer on startup Sascha Hauer
2010-06-24  9:39 ` [PATCH 04/11] memcpy cmd: Do not expect to read/write the whole chunk at once Sascha Hauer
2010-06-25  7:17   ` Peter Korsgaard
2010-06-28  8:37     ` Sascha Hauer
2010-06-24  9:39 ` [PATCH 05/11] armlinux: reorder tag setup Sascha Hauer
2010-06-24  9:39 ` [PATCH 06/11] remove eco920 board support Sascha Hauer
2010-06-24  9:39 ` Sascha Hauer [this message]
2010-06-24  9:39 ` [PATCH 08/11] i.MX serial: Use readl/writel instead of pointer deref Sascha Hauer
2010-06-24  9:39 ` [PATCH 09/11] i.MX clocksource: " Sascha Hauer
2010-06-24  9:39 ` [PATCH 10/11] i.MX27: Add some missing device base addresses Sascha Hauer
2010-06-24  9:39 ` [PATCH 11/11] fb: add a usage counter to prevent double enable/disable Sascha Hauer
2010-06-24 15:05 ` assorted patches Eric Bénard

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=1277372356-32370-8-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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