diff options
| author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-09-12 10:03:34 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-09-12 23:27:58 -0400 |
| commit | 941992d2944789641470626e9336d663236b1d28 (patch) | |
| tree | 9fcb7754d17cee37a95159f3034d43a8e96b9eb8 /drivers/net/ethernet/amd | |
| parent | 5a5ab1611aa5c17a32b64a4c5069c26e1fd7c960 (diff) | |
ethernet: amd: 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: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/amd')
| -rw-r--r-- | drivers/net/ethernet/amd/7990.c | 6 | ||||
| -rw-r--r-- | drivers/net/ethernet/amd/amd8111e.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/amd/7990.c b/drivers/net/ethernet/amd/7990.c index dcf2a1f3643d..dc57f2759f44 100644 --- a/drivers/net/ethernet/amd/7990.c +++ b/drivers/net/ethernet/amd/7990.c | |||
| @@ -45,14 +45,14 @@ | |||
| 45 | #define WRITERDP(lp, x) out_be16(lp->base + LANCE_RDP, (x)) | 45 | #define WRITERDP(lp, x) out_be16(lp->base + LANCE_RDP, (x)) |
| 46 | #define READRDP(lp) in_be16(lp->base + LANCE_RDP) | 46 | #define READRDP(lp) in_be16(lp->base + LANCE_RDP) |
| 47 | 47 | ||
| 48 | #if defined(CONFIG_HPLANCE) || defined(CONFIG_HPLANCE_MODULE) | 48 | #if IS_ENABLED(CONFIG_HPLANCE) |
| 49 | #include "hplance.h" | 49 | #include "hplance.h" |
| 50 | 50 | ||
| 51 | #undef WRITERAP | 51 | #undef WRITERAP |
| 52 | #undef WRITERDP | 52 | #undef WRITERDP |
| 53 | #undef READRDP | 53 | #undef READRDP |
| 54 | 54 | ||
| 55 | #if defined(CONFIG_MVME147_NET) || defined(CONFIG_MVME147_NET_MODULE) | 55 | #if IS_ENABLED(CONFIG_MVME147_NET) |
| 56 | 56 | ||
| 57 | /* Lossage Factor Nine, Mr Sulu. */ | 57 | /* Lossage Factor Nine, Mr Sulu. */ |
| 58 | #define WRITERAP(lp, x) (lp->writerap(lp, x)) | 58 | #define WRITERAP(lp, x) (lp->writerap(lp, x)) |
| @@ -86,7 +86,7 @@ static inline __u16 READRDP(struct lance_private *lp) | |||
| 86 | } | 86 | } |
| 87 | 87 | ||
| 88 | #endif | 88 | #endif |
| 89 | #endif /* CONFIG_HPLANCE || CONFIG_HPLANCE_MODULE */ | 89 | #endif /* IS_ENABLED(CONFIG_HPLANCE) */ |
| 90 | 90 | ||
| 91 | /* debugging output macros, various flavours */ | 91 | /* debugging output macros, various flavours */ |
| 92 | /* #define TEST_HITS */ | 92 | /* #define TEST_HITS */ |
diff --git a/drivers/net/ethernet/amd/amd8111e.c b/drivers/net/ethernet/amd/amd8111e.c index 94960055fa1f..f92cc97151ec 100644 --- a/drivers/net/ethernet/amd/amd8111e.c +++ b/drivers/net/ethernet/amd/amd8111e.c | |||
| @@ -89,7 +89,7 @@ Revision History: | |||
| 89 | #include <asm/byteorder.h> | 89 | #include <asm/byteorder.h> |
| 90 | #include <asm/uaccess.h> | 90 | #include <asm/uaccess.h> |
| 91 | 91 | ||
| 92 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | 92 | #if IS_ENABLED(CONFIG_VLAN_8021Q) |
| 93 | #define AMD8111E_VLAN_TAG_USED 1 | 93 | #define AMD8111E_VLAN_TAG_USED 1 |
| 94 | #else | 94 | #else |
| 95 | #define AMD8111E_VLAN_TAG_USED 0 | 95 | #define AMD8111E_VLAN_TAG_USED 0 |
