Skip to content

Commit

Permalink
api: Disable api_net when DM is used
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
  • Loading branch information
Michal Simek committed Jul 22, 2016
1 parent 72d8d5d commit 2118157
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/api_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 2118157

Please sign in to comment.