aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-12-05 15:03:41 -0500
committerJeff Garzik <jeff@garzik.org>2006-12-07 04:59:20 -0500
commit0efdf2626676db4b30d343ff88f8461ad09130da (patch)
treedff15eb8473b58e185817b16191e23d38fe1c53e /drivers/net/sky2.c
parent7f4b45c5269049e223eda31c7e3879c226039e4a (diff)
[PATCH] sky2: sparse warnings
Get rid of sparse warnings in sky2 driver because of mixed enum usage. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index a8e096393a41..fb1d2c30c1bb 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -521,7 +521,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
521 /* set Tx LED (LED_TX) to blink mode on Rx OR Tx activity */ 521 /* set Tx LED (LED_TX) to blink mode on Rx OR Tx activity */
522 ledctrl |= PHY_M_LED_BLINK_RT(BLINK_84MS) | PHY_M_LEDC_TX_CTRL; 522 ledctrl |= PHY_M_LED_BLINK_RT(BLINK_84MS) | PHY_M_LEDC_TX_CTRL;
523 /* turn off the Rx LED (LED_RX) */ 523 /* turn off the Rx LED (LED_RX) */
524 ledover |= PHY_M_LED_MO_RX(MO_LED_OFF); 524 ledover &= ~PHY_M_LED_MO_RX;
525 } 525 }
526 526
527 if (hw->chip_id == CHIP_ID_YUKON_EC_U && hw->chip_rev == CHIP_REV_YU_EC_A1) { 527 if (hw->chip_id == CHIP_ID_YUKON_EC_U && hw->chip_rev == CHIP_REV_YU_EC_A1) {
@@ -544,7 +544,7 @@ static void sky2_phy_init(struct sky2_hw *hw, unsigned port)
544 544
545 if (sky2->autoneg == AUTONEG_DISABLE || sky2->speed == SPEED_100) { 545 if (sky2->autoneg == AUTONEG_DISABLE || sky2->speed == SPEED_100) {
546 /* turn on 100 Mbps LED (LED_LINK100) */ 546 /* turn on 100 Mbps LED (LED_LINK100) */
547 ledover |= PHY_M_LED_MO_100(MO_LED_ON); 547 ledover |= PHY_M_LED_MO_100;
548 } 548 }
549 549
550 if (ledover) 550 if (ledover)
@@ -2930,18 +2930,8 @@ static void sky2_led(struct sky2_hw *hw, unsigned port, int on)
2930 2930
2931 default: 2931 default:
2932 gm_phy_write(hw, port, PHY_MARV_LED_CTRL, 0); 2932 gm_phy_write(hw, port, PHY_MARV_LED_CTRL, 0);
2933 gm_phy_write(hw, port, PHY_MARV_LED_OVER, 2933 gm_phy_write(hw, port, PHY_MARV_LED_OVER,
2934 on ? PHY_M_LED_MO_DUP(MO_LED_ON) | 2934 on ? PHY_M_LED_ALL : 0);
2935 PHY_M_LED_MO_10(MO_LED_ON) |
2936 PHY_M_LED_MO_100(MO_LED_ON) |
2937 PHY_M_LED_MO_1000(MO_LED_ON) |
2938 PHY_M_LED_MO_RX(MO_LED_ON)
2939 : PHY_M_LED_MO_DUP(MO_LED_OFF) |
2940 PHY_M_LED_MO_10(MO_LED_OFF) |
2941 PHY_M_LED_MO_100(MO_LED_OFF) |
2942 PHY_M_LED_MO_1000(MO_LED_OFF) |
2943 PHY_M_LED_MO_RX(MO_LED_OFF));
2944
2945 } 2935 }
2946} 2936}
2947 2937