Commit 547e530a authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by David S. Miller

sis900: use IS_ENABLED() instead of checking for built-in or module

The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either
built-in or as a module, use that macro instead of open coding the same.

Using the macro makes the code more readable by helping abstract away some
of the Kconfig built-in and module enable details.
Signed-off-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: default avatarDaniele Venzano <venza@brownhat.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 795f0234
...@@ -1426,7 +1426,7 @@ static void sis900_set_mode(struct sis900_private *sp, int speed, int duplex) ...@@ -1426,7 +1426,7 @@ static void sis900_set_mode(struct sis900_private *sp, int speed, int duplex)
rx_flags |= RxATX; rx_flags |= RxATX;
} }
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) #if IS_ENABLED(CONFIG_VLAN_8021Q)
/* Can accept Jumbo packet */ /* Can accept Jumbo packet */
rx_flags |= RxAJAB; rx_flags |= RxAJAB;
#endif #endif
...@@ -1750,7 +1750,7 @@ static int sis900_rx(struct net_device *net_dev) ...@@ -1750,7 +1750,7 @@ static int sis900_rx(struct net_device *net_dev)
data_size = rx_status & DSIZE; data_size = rx_status & DSIZE;
rx_size = data_size - CRC_SIZE; rx_size = data_size - CRC_SIZE;
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) #if IS_ENABLED(CONFIG_VLAN_8021Q)
/* ``TOOLONG'' flag means jumbo packet received. */ /* ``TOOLONG'' flag means jumbo packet received. */
if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE) if ((rx_status & TOOLONG) && data_size <= MAX_FRAME_SIZE)
rx_status &= (~ ((unsigned int)TOOLONG)); rx_status &= (~ ((unsigned int)TOOLONG));
......
...@@ -310,7 +310,7 @@ enum sis630_revision_id { ...@@ -310,7 +310,7 @@ enum sis630_revision_id {
#define CRC_SIZE 4 #define CRC_SIZE 4
#define MAC_HEADER_SIZE 14 #define MAC_HEADER_SIZE 14
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) #if IS_ENABLED(CONFIG_VLAN_8021Q)
#define MAX_FRAME_SIZE (1518 + 4) #define MAX_FRAME_SIZE (1518 + 4)
#else #else
#define MAX_FRAME_SIZE 1518 #define MAX_FRAME_SIZE 1518
......
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