From fa6d3be08538bb80274d20c7e59f9beca48fa44a Mon Sep 17 00:00:00 2001 From: Eric Miao Date: Thu, 19 Jun 2008 17:19:57 +0800 Subject: [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 Acked-by: Nicolas Pitre Acked-by: Jeff Garzik Signed-off-by: Russell King --- drivers/net/smc91x.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'drivers/net/smc91x.c') 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) lp = netdev_priv(ndev); -#ifdef SMC_DYNAMIC_BUS_CONFIG if (pd) memcpy(&lp->cfg, pd, sizeof(lp->cfg)); else { - lp->cfg.flags = SMC91X_USE_8BIT; - lp->cfg.flags |= SMC91X_USE_16BIT; - lp->cfg.flags |= SMC91X_USE_32BIT; + lp->cfg.flags |= (SMC_CAN_USE_8BIT) ? SMC91X_USE_8BIT : 0; + lp->cfg.flags |= (SMC_CAN_USE_16BIT) ? SMC91X_USE_16BIT : 0; + lp->cfg.flags |= (SMC_CAN_USE_32BIT) ? SMC91X_USE_32BIT : 0; } - lp->cfg.flags &= ~(SMC_CAN_USE_8BIT ? 0 : SMC91X_USE_8BIT); - lp->cfg.flags &= ~(SMC_CAN_USE_16BIT ? 0 : SMC91X_USE_16BIT); - lp->cfg.flags &= ~(SMC_CAN_USE_32BIT ? 0 : SMC91X_USE_32BIT); -#endif - ndev->dma = (unsigned char)-1; ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0); -- cgit v1.2.3