Changeset 19199


Ignore:
Timestamp:
2010-01-17T22:17:53+01:00 (8 years ago)
Author:
juhosg
Message:

rtl8366_smi: move memset into the rtl8366s_get_member_config function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c

    r19198 r19199  
    689689        u16 *tableaddr; 
    690690 
     691        memset(vlanmconf, '\0', sizeof(struct rtl8366s_vlanconfig)); 
     692 
    691693        if (index >= RTL8366_NUM_VLANS) 
    692694                return -EINVAL; 
     
    790792        struct rtl8366s_vlanconfig vlanMC; 
    791793 
    792         memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig)); 
    793  
    794794        err = rtl8366_get_port_vlan_index(smi, port, &index); 
    795795        if (err) 
     
    865865           VID is already there and change it */ 
    866866        for (i = 0; i < RTL8366_NUM_VLANS; ++i) { 
    867                 memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig)); 
    868867                rtl8366s_get_vlan_member_config(smi, i, &vlanMC); 
    869868 
     
    883882           has no member ports) with new one */ 
    884883        for (i = 0; i < RTL8366_NUM_VLANS; ++i) { 
    885                 memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig)); 
    886884                rtl8366s_get_vlan_member_config(smi, i, &vlanMC); 
    887885 
     
    10361034        for (i = 0; i < RTL8366_NUM_VLANS; ++i) { 
    10371035                struct rtl8366s_vlanconfig vlanMC; 
    1038                 memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig)); 
     1036 
    10391037                rtl8366s_get_vlan_member_config(smi, i, &vlanMC); 
    10401038 
     
    13671365 
    13681366        memset(buf, '\0', sizeof(buf)); 
    1369         memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig)); 
    13701367 
    13711368        rtl8366s_get_vlan_member_config(smi, val->port_vlan, &vlanMC); 
     
    14931490        struct rtl8366s_vlan4kentry vlan4K; 
    14941491        struct rtl8366_smi *smi = to_rtl8366(dev); 
    1495         memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig)); 
    14961492 
    14971493        if (val->port_vlan >= RTL8366_NUM_VLANS) 
     
    15161512        struct rtl8366s_vlan4kentry vlan4K; 
    15171513        struct rtl8366_smi *smi = to_rtl8366(dev); 
    1518         memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig)); 
    15191514 
    15201515        if (val->port_vlan >= RTL8366_NUM_VLANS) 
     
    15371532        struct rtl8366s_vlan4kentry vlan4K; 
    15381533        struct rtl8366_smi *smi = to_rtl8366(dev); 
    1539         memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig)); 
    15401534 
    15411535        if (val->port_vlan >= RTL8366_NUM_VLANS) 
     
    15591553        struct rtl8366s_vlan4kentry vlan4K; 
    15601554        struct rtl8366_smi *smi = to_rtl8366(dev); 
    1561         memset(&vlanMC, '\0', sizeof(struct rtl8366s_vlanconfig)); 
    15621555 
    15631556        if (val->port_vlan >= RTL8366_NUM_VLANS) 
Note: See TracChangeset for help on using the changeset viewer.