diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/smc91x.c | 12 | ||||
-rw-r--r-- | drivers/net/smc91x.h | 13 |
2 files changed, 6 insertions, 19 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); |
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h index 8606818653f8..8310f1a073d8 100644 --- a/drivers/net/smc91x.h +++ b/drivers/net/smc91x.h | |||
@@ -454,7 +454,6 @@ static inline void LPD7_SMC_outsw (unsigned char* a, int r, | |||
454 | #define RPC_LSA_DEFAULT RPC_LED_100_10 | 454 | #define RPC_LSA_DEFAULT RPC_LED_100_10 |
455 | #define RPC_LSB_DEFAULT RPC_LED_TX_RX | 455 | #define RPC_LSB_DEFAULT RPC_LED_TX_RX |
456 | 456 | ||
457 | #define SMC_DYNAMIC_BUS_CONFIG | ||
458 | #endif | 457 | #endif |
459 | 458 | ||
460 | 459 | ||
@@ -504,15 +503,9 @@ struct smc_local { | |||
504 | struct smc91x_platdata cfg; | 503 | struct smc91x_platdata cfg; |
505 | }; | 504 | }; |
506 | 505 | ||
507 | #ifdef SMC_DYNAMIC_BUS_CONFIG | 506 | #define SMC_8BIT(p) ((p)->cfg.flags & SMC91X_USE_8BIT) |
508 | #define SMC_8BIT(p) (((p)->cfg.flags & SMC91X_USE_8BIT) && SMC_CAN_USE_8BIT) | 507 | #define SMC_16BIT(p) ((p)->cfg.flags & SMC91X_USE_16BIT) |
509 | #define SMC_16BIT(p) (((p)->cfg.flags & SMC91X_USE_16BIT) && SMC_CAN_USE_16BIT) | 508 | #define SMC_32BIT(p) ((p)->cfg.flags & SMC91X_USE_32BIT) |
510 | #define SMC_32BIT(p) (((p)->cfg.flags & SMC91X_USE_32BIT) && SMC_CAN_USE_32BIT) | ||
511 | #else | ||
512 | #define SMC_8BIT(p) SMC_CAN_USE_8BIT | ||
513 | #define SMC_16BIT(p) SMC_CAN_USE_16BIT | ||
514 | #define SMC_32BIT(p) SMC_CAN_USE_32BIT | ||
515 | #endif | ||
516 | 509 | ||
517 | #ifdef SMC_USE_PXA_DMA | 510 | #ifdef SMC_USE_PXA_DMA |
518 | /* | 511 | /* |