diff options
author | Simon Glass <sjg@chromium.org> | 2015-07-06 16:47:50 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-07-21 17:39:40 -0600 |
commit | c8c2797c381054beaf3de89027af92a0b84b36cc (patch) | |
tree | ccf9f16c38f52cbe0477c398ec36b38a90892b6d /common | |
parent | a1ca92eaaf0cac2a11c16b93f0cd0cd6f6256f02 (diff) | |
download | u-boot-c8c2797c381054beaf3de89027af92a0b84b36cc.tar.gz |
dm: usb: eth: Support driver model with USB Ethernet
At present USB Ethernet does not work with CONFIG_DM_ETH. Add driver model
support to this feature, so that it can work alongside other Ethernet
devices with driver model.
It was found that quite a bit of code is common in most of the USB Ethernet
drivers. Add this code to the common layer to reduce the amount of duplicate
code needed in USB Ethernet drivers when CONFIG_DM_ETH is used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/cmd_usb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 6198d063d1..0ade7759f0 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -22,7 +22,7 @@ #ifdef CONFIG_USB_STORAGE static int usb_stor_curr_dev = -1; /* current device */ #endif -#ifdef CONFIG_USB_HOST_ETHER +#if defined(CONFIG_USB_HOST_ETHER) && !defined(CONFIG_DM_ETH) static int __maybe_unused usb_ether_curr_dev = -1; /* current ethernet device */ #endif |