Commit 69559093 authored by Simon Glass's avatar Simon Glass
Browse files

dm: usb: Avoid using USB ethernet with CONFIG_DM_USB and no DM_ETH

If driver model is used for Ethernet then USB Ethernet does not build. This
can be made to work with driver model is used for USB also. Add #ifdef logic
to make this clear when building.
Signed-off-by: default avatarSimon Glass <>
Reviewed-by: default avatarMarek Vasut <>
parent b483915f
......@@ -23,7 +23,7 @@
static int usb_stor_curr_dev = -1; /* current device */
static int usb_ether_curr_dev = -1; /* current ethernet device */
static int __maybe_unused usb_ether_curr_dev = -1; /* current ethernet device */
/* some display routines (info command) */
......@@ -530,11 +530,14 @@ static void do_usb_start(void)
/* try to recognize storage devices immediately */
usb_stor_curr_dev = usb_stor_scan(1);
# error "You must use CONFIG_DM_USB if you want to use CONFIG_USB_HOST_ETHER with CONFIG_DM_ETH"
# endif
/* try to recognize ethernet devices immediately */
usb_ether_curr_dev = usb_host_eth_scan(1);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment