From c8c2797c381054beaf3de89027af92a0b84b36cc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 6 Jul 2015 16:47:50 -0600 Subject: 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 Reviewed-by: Marek Vasut --- common/cmd_usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/cmd_usb.c') diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 6198d06..0ade775 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 -- cgit v1.1