From: Alexander Duyck Date: Sat, 13 Sep 2014 06:12:46 +0000 (-0700) Subject: netdevice: Support DSA tagging when DSA is built as a module X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3fc8867740b4a0bf56f372c6f5ddd14970962fb1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git netdevice: Support DSA tagging when DSA is built as a module This change corrects an error seen when DSA tagging is built as a module. Without this change it is not possible to get XDSA tagged frames as the test for tagging is stripped by the #ifdef check. Signed-off-by: Alexander Duyck Acked-by: Florian Fainelli Signed-off-by: David S. Miller --- diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index ee38b948d9a0..f9e81d10a3b9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -1789,7 +1789,7 @@ void dev_net_set(struct net_device *dev, struct net *net) static inline bool netdev_uses_dsa(struct net_device *dev) { -#ifdef CONFIG_NET_DSA +#if IS_ENABLED(CONFIG_NET_DSA) if (dev->dsa_ptr != NULL) return dsa_uses_tagged_protocol(dev->dsa_ptr); #endif