diff options
author | Javier Martinez Canillas <javier@osg.samsung.com> | 2016-09-12 10:03:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-12 23:27:58 -0400 |
commit | 504e76e5b93d9c6a5fbfaa8ea63ad3f7fe77f601 (patch) | |
tree | e45ddd5257ffaac6cc75f6bf26e03d7dea871c4d | |
parent | 067577868b4fdeaf2f93ec5c4e9b29a0eded6528 (diff) |
net/fsl_pq_mdio: 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/freescale/fsl_pq_mdio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c index f3c63dce1e30..446c7b374ff5 100644 --- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c +++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c | |||
@@ -195,7 +195,7 @@ static int fsl_pq_mdio_reset(struct mii_bus *bus) | |||
195 | return 0; | 195 | return 0; |
196 | } | 196 | } |
197 | 197 | ||
198 | #if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE) | 198 | #if IS_ENABLED(CONFIG_GIANFAR) |
199 | /* | 199 | /* |
200 | * Return the TBIPA address, starting from the address | 200 | * Return the TBIPA address, starting from the address |
201 | * of the mapped GFAR MDIO registers (struct gfar) | 201 | * of the mapped GFAR MDIO registers (struct gfar) |
@@ -228,7 +228,7 @@ static uint32_t __iomem *get_etsec_tbipa(void __iomem *p) | |||
228 | } | 228 | } |
229 | #endif | 229 | #endif |
230 | 230 | ||
231 | #if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE) | 231 | #if IS_ENABLED(CONFIG_UCC_GETH) |
232 | /* | 232 | /* |
233 | * Return the TBIPAR address for a QE MDIO node, starting from the address | 233 | * Return the TBIPAR address for a QE MDIO node, starting from the address |
234 | * of the mapped MII registers (struct fsl_pq_mii) | 234 | * of the mapped MII registers (struct fsl_pq_mii) |
@@ -306,7 +306,7 @@ static void ucc_configure(phys_addr_t start, phys_addr_t end) | |||
306 | #endif | 306 | #endif |
307 | 307 | ||
308 | static const struct of_device_id fsl_pq_mdio_match[] = { | 308 | static const struct of_device_id fsl_pq_mdio_match[] = { |
309 | #if defined(CONFIG_GIANFAR) || defined(CONFIG_GIANFAR_MODULE) | 309 | #if IS_ENABLED(CONFIG_GIANFAR) |
310 | { | 310 | { |
311 | .compatible = "fsl,gianfar-tbi", | 311 | .compatible = "fsl,gianfar-tbi", |
312 | .data = &(struct fsl_pq_mdio_data) { | 312 | .data = &(struct fsl_pq_mdio_data) { |
@@ -344,7 +344,7 @@ static const struct of_device_id fsl_pq_mdio_match[] = { | |||
344 | }, | 344 | }, |
345 | }, | 345 | }, |
346 | #endif | 346 | #endif |
347 | #if defined(CONFIG_UCC_GETH) || defined(CONFIG_UCC_GETH_MODULE) | 347 | #if IS_ENABLED(CONFIG_UCC_GETH) |
348 | { | 348 | { |
349 | .compatible = "fsl,ucc-mdio", | 349 | .compatible = "fsl,ucc-mdio", |
350 | .data = &(struct fsl_pq_mdio_data) { | 350 | .data = &(struct fsl_pq_mdio_data) { |