Make the chip id value's an enum. This makes it possible for GCC to do better type checking for us. Signed-off-by: Stephen Hemmminger --- drivers/net/sky2.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) --- sky2-2.6.21.orig/drivers/net/sky2.h 2007-05-08 15:55:20.000000000 -0700 +++ sky2-2.6.21/drivers/net/sky2.h 2007-05-08 15:56:07.000000000 -0700 @@ -332,24 +332,27 @@ enum { }; /* B2_CHIP_ID 8 bit Chip Identification Number */ -enum { +enum sky2_chip_id { CHIP_ID_YUKON_XL = 0xb3, /* Chip ID for YUKON-2 XL */ CHIP_ID_YUKON_EC_U = 0xb4, /* Chip ID for YUKON-2 EC Ultra */ CHIP_ID_YUKON_EX = 0xb5, /* Chip ID for YUKON-2 Extreme */ CHIP_ID_YUKON_EC = 0xb6, /* Chip ID for YUKON-2 EC */ CHIP_ID_YUKON_FE = 0xb7, /* Chip ID for YUKON-2 FE */ +}; +enum yukon_ec_rev { CHIP_REV_YU_EC_A1 = 0, /* Chip Rev. for Yukon-EC A1/A0 */ CHIP_REV_YU_EC_A2 = 1, /* Chip Rev. for Yukon-EC A2 */ CHIP_REV_YU_EC_A3 = 2, /* Chip Rev. for Yukon-EC A3 */ - +}; +enum yukon_ec_u_rev { CHIP_REV_YU_EC_U_A0 = 1, CHIP_REV_YU_EC_U_A1 = 2, CHIP_REV_YU_EC_U_B0 = 3, - +}; +enum yukon_fe_rev { CHIP_REV_YU_FE_A1 = 1, CHIP_REV_YU_FE_A2 = 2, - }; /* B2_Y2_CLK_GATE 8 bit Clock Gating (Yukon-2 only) */ @@ -1753,7 +1756,7 @@ struct sky2_hw { struct pci_dev *pdev; struct net_device *dev[2]; - u8 chip_id; + enum sky2_chip_id chip_id; u8 chip_rev; u8 pmd_type; u8 ports; -- - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html