From: Michal Simek Date: Mon, 6 Jun 2016 08:58:40 +0000 (+0200) Subject: api: Disable api_net when DM is used X-Git-Tag: v2025.01-rc5-pxa1908~8960^2~14 X-Git-Url: http://git.dujemihanovic.xyz/%22http:/www.sics.se/static/git-favicon.png?a=commitdiff_plain;h=211815784c0e35a274e13054a7966b21098f8a14;p=u-boot.git api: Disable api_net when DM is used When CONFIG_API is selected with DM_ETH this error is present: api/api_net.c: In function 'dev_enum_net': api/api_net.c:61:35: warning: initialization from incompatible pointer type struct eth_device *eth_current = eth_get_dev(); ^ api/api_net.c:68:39: error: dereferencing pointer to incomplete type memcpy(di->di_net.hwaddr, eth_current->enetaddr, 6); ^ Disable api_net functions when ETH_DM is selected. Signed-off-by: Chris Johns Signed-off-by: Michal Simek --- diff --git a/api/api_net.c b/api/api_net.c index 04e4f4a44e..67c291682a 100644 --- a/api/api_net.c +++ b/api/api_net.c @@ -25,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR; #define errf(fmt, args...) do { printf("ERROR @ %s(): ", __func__); printf(fmt, ##args); } while (0) -#ifdef CONFIG_CMD_NET +#if defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH) static int dev_valid_net(void *cookie) {