summaryrefslogtreecommitdiff
path: root/drivers/net/e1000.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-08-19 18:33:40 +0300
committerJoe Hershberger <joe.hershberger@ni.com>2015-08-22 00:33:21 +0300
commitc6d80a152207f6fad5a8e79bf1005fdbabb16d12 (patch)
treeecbd075ccbe370a8196267a58c60c820f433c88e /drivers/net/e1000.h
parent5c5e707a551458d3602d684ead28a97f18a4644f (diff)
downloadu-boot-c6d80a152207f6fad5a8e79bf1005fdbabb16d12.tar.xz
net: e1000: Convert to driver model
Update this driver to support driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-on: Apalis T30 2GB on Apalis Evaluation Board
Diffstat (limited to 'drivers/net/e1000.h')
-rw-r--r--drivers/net/e1000.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/e1000.h b/drivers/net/e1000.h
index da04cabd91..c851922ae5 100644
--- a/drivers/net/e1000.h
+++ b/drivers/net/e1000.h
@@ -22,7 +22,10 @@
#include <linux/list.h>
#include <malloc.h>
#include <net.h>
+/* Avoids a compile error since struct eth_device is not defined */
+#ifndef CONFIG_DM_ETH
#include <netdev.h>
+#endif
#include <asm/io.h>
#include <pci.h>
@@ -1073,7 +1076,9 @@ typedef enum {
struct e1000_hw {
const char *name;
struct list_head list_node;
+#ifndef CONFIG_DM_ETH
struct eth_device *nic;
+#endif
#ifdef CONFIG_E1000_SPI
struct spi_slave spi;
#endif