net: slip: allow compilation without CONFIG_NET_LLDP

Without this change compilation of the SLIP module would fail if LLDP
wasn't enabled. There is also no need to include net/lldp.h explicitly
as net/ethernet.h will include it conditionally if CONFIG_NET_LLDP is
defined.

Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net>
This commit is contained in:
Sören Tempel 2019-04-24 19:37:04 +02:00 committed by Jukka Rissanen
commit 7a824d8b94

View file

@ -32,7 +32,6 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include <net/net_core.h> #include <net/net_core.h>
#include <console/uart_pipe.h> #include <console/uart_pipe.h>
#include <net/ethernet.h> #include <net/ethernet.h>
#include <net/lldp.h>
#define SLIP_END 0300 #define SLIP_END 0300
#define SLIP_ESC 0333 #define SLIP_ESC 0333
@ -397,7 +396,9 @@ static void slip_iface_init(struct net_if *iface)
ethernet_init(iface); ethernet_init(iface);
#if defined(CONFIG_NET_LLDP)
net_lldp_set_lldpdu(iface); net_lldp_set_lldpdu(iface);
#endif
if (slip->init_done) { if (slip->init_done) {
return; return;