aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/smc91x.c
diff options
context:
space:
mode:
authorEric Miao <eric.miao@marvell.com>2008-06-19 05:19:57 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-07-12 16:52:40 -0400
commitfa6d3be08538bb80274d20c7e59f9beca48fa44a (patch)
tree9f5df8e61bac1138d971d323472f2d4fbf3ca87b /drivers/net/smc91x.c
parentd280eadc4fba0bf99fb1c3b60e8c5e007f7da02c (diff)
[NET] smc91x: favor the use of SMC91X_USE_* instead of SMC_CAN_USE_*
Let's simplify the logic and avoid confusion, the use of SMC91X_USE_* is favored than SMC_CAN_USE_*, if platform data isn't given, convert the hardcoded SMC_CAN_USE_* to SMC91X_USE_*. Signed-off-by: Eric Miao <eric.miao@marvell.com> Acked-by: Nicolas Pitre <nico@cam.org> Acked-by: Jeff Garzik <jgarzik@pobox.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/net/smc91x.c')
-rw-r--r--drivers/net/smc91x.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index e4a6c361995a..1b19022b6c7c 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -2154,20 +2154,14 @@ static int smc_drv_probe(struct platform_device *pdev)
2154 2154
2155 lp = netdev_priv(ndev); 2155 lp = netdev_priv(ndev);
2156 2156
2157#ifdef SMC_DYNAMIC_BUS_CONFIG
2158 if (pd) 2157 if (pd)
2159 memcpy(&lp->cfg, pd, sizeof(lp->cfg)); 2158 memcpy(&lp->cfg, pd, sizeof(lp->cfg));
2160 else { 2159 else {
2161 lp->cfg.flags = SMC91X_USE_8BIT; 2160 lp->cfg.flags |= (SMC_CAN_USE_8BIT) ? SMC91X_USE_8BIT : 0;
2162 lp->cfg.flags |= SMC91X_USE_16BIT; 2161 lp->cfg.flags |= (SMC_CAN_USE_16BIT) ? SMC91X_USE_16BIT : 0;
2163 lp->cfg.flags |= SMC91X_USE_32BIT; 2162 lp->cfg.flags |= (SMC_CAN_USE_32BIT) ? SMC91X_USE_32BIT : 0;
2164 } 2163 }
2165 2164
2166 lp->cfg.flags &= ~(SMC_CAN_USE_8BIT ? 0 : SMC91X_USE_8BIT);
2167 lp->cfg.flags &= ~(SMC_CAN_USE_16BIT ? 0 : SMC91X_USE_16BIT);
2168 lp->cfg.flags &= ~(SMC_CAN_USE_32BIT ? 0 : SMC91X_USE_32BIT);
2169#endif
2170
2171 ndev->dma = (unsigned char)-1; 2165 ndev->dma = (unsigned char)-1;
2172 2166
2173 ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 2167 ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0);