Changeset 31007


Ignore:
Timestamp:
2012-03-18T23:06:42+01:00 (6 years ago)
Author:
juhosg
Message:

generic: ar8216: use ar8216_sw_ prefix for switchdev related functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/files/drivers/net/phy/ar8216.c

    r31006 r31007  
    214214 
    215215static int 
    216 ar8216_set_vlan(struct switch_dev *dev, const struct switch_attr *attr, 
    217                 struct switch_val *val) 
     216ar8216_sw_set_vlan(struct switch_dev *dev, const struct switch_attr *attr, 
     217                   struct switch_val *val) 
    218218{ 
    219219        struct ar8216_priv *priv = to_ar8216(dev); 
     
    223223 
    224224static int 
    225 ar8216_get_vlan(struct switch_dev *dev, const struct switch_attr *attr, 
    226                 struct switch_val *val) 
     225ar8216_sw_get_vlan(struct switch_dev *dev, const struct switch_attr *attr, 
     226                   struct switch_val *val) 
    227227{ 
    228228        struct ar8216_priv *priv = to_ar8216(dev); 
     
    233233 
    234234static int 
    235 ar8216_set_pvid(struct switch_dev *dev, int port, int vlan) 
     235ar8216_sw_set_pvid(struct switch_dev *dev, int port, int vlan) 
    236236{ 
    237237        struct ar8216_priv *priv = to_ar8216(dev); 
     
    247247 
    248248static int 
    249 ar8216_get_pvid(struct switch_dev *dev, int port, int *vlan) 
     249ar8216_sw_get_pvid(struct switch_dev *dev, int port, int *vlan) 
    250250{ 
    251251        struct ar8216_priv *priv = to_ar8216(dev); 
     
    255255 
    256256static int 
    257 ar8216_set_vid(struct switch_dev *dev, const struct switch_attr *attr, 
    258                struct switch_val *val) 
     257ar8216_sw_set_vid(struct switch_dev *dev, const struct switch_attr *attr, 
     258                  struct switch_val *val) 
    259259{ 
    260260        struct ar8216_priv *priv = to_ar8216(dev); 
     
    264264 
    265265static int 
    266 ar8216_get_vid(struct switch_dev *dev, const struct switch_attr *attr, 
    267                struct switch_val *val) 
     266ar8216_sw_get_vid(struct switch_dev *dev, const struct switch_attr *attr, 
     267                  struct switch_val *val) 
    268268{ 
    269269        struct ar8216_priv *priv = to_ar8216(dev); 
     
    273273 
    274274static int 
    275 ar8216_get_port_link(struct switch_dev *dev, int port, 
    276                      struct switch_port_link *link) 
     275ar8216_sw_get_port_link(struct switch_dev *dev, int port, 
     276                        struct switch_port_link *link) 
    277277{ 
    278278        struct ar8216_priv *priv = to_ar8216(dev); 
     
    384384                .name = "enable_vlan", 
    385385                .description = "Enable VLAN mode", 
    386                 .set = ar8216_set_vlan, 
    387                 .get = ar8216_get_vlan, 
     386                .set = ar8216_sw_set_vlan, 
     387                .get = ar8216_sw_get_vlan, 
    388388                .max = 1 
    389389        }, 
     
    398398                .name = "vid", 
    399399                .description = "VLAN ID (0-4094)", 
    400                 .set = ar8216_set_vid, 
    401                 .get = ar8216_get_vid, 
     400                .set = ar8216_sw_set_vid, 
     401                .get = ar8216_sw_get_vid, 
    402402                .max = 4094, 
    403403        }, 
     
    406406 
    407407static int 
    408 ar8216_get_ports(struct switch_dev *dev, struct switch_val *val) 
     408ar8216_sw_get_ports(struct switch_dev *dev, struct switch_val *val) 
    409409{ 
    410410        struct ar8216_priv *priv = to_ar8216(dev); 
     
    430430 
    431431static int 
    432 ar8216_set_ports(struct switch_dev *dev, struct switch_val *val) 
     432ar8216_sw_set_ports(struct switch_dev *dev, struct switch_val *val) 
    433433{ 
    434434        struct ar8216_priv *priv = to_ar8216(dev); 
     
    580580 
    581581static int 
    582 ar8216_hw_apply(struct switch_dev *dev) 
     582ar8216_sw_hw_apply(struct switch_dev *dev) 
    583583{ 
    584584        struct ar8216_priv *priv = to_ar8216(dev); 
     
    828828 
    829829static int 
    830 ar8216_reset_switch(struct switch_dev *dev) 
     830ar8216_sw_reset_switch(struct switch_dev *dev) 
    831831{ 
    832832        struct ar8216_priv *priv = to_ar8216(dev); 
     
    847847        mutex_unlock(&priv->reg_mutex); 
    848848 
    849         return ar8216_hw_apply(dev); 
     849        return ar8216_sw_hw_apply(dev); 
    850850} 
    851851 
     
    863863                .n_attr = ARRAY_SIZE(ar8216_vlan), 
    864864        }, 
    865         .get_port_pvid = ar8216_get_pvid, 
    866         .set_port_pvid = ar8216_set_pvid, 
    867         .get_vlan_ports = ar8216_get_ports, 
    868         .set_vlan_ports = ar8216_set_ports, 
    869         .apply_config = ar8216_hw_apply, 
    870         .reset_switch = ar8216_reset_switch, 
    871         .get_port_link = ar8216_get_port_link, 
     865        .get_port_pvid = ar8216_sw_get_pvid, 
     866        .set_port_pvid = ar8216_sw_set_pvid, 
     867        .get_vlan_ports = ar8216_sw_get_ports, 
     868        .set_vlan_ports = ar8216_sw_set_ports, 
     869        .apply_config = ar8216_sw_hw_apply, 
     870        .reset_switch = ar8216_sw_reset_switch, 
     871        .get_port_link = ar8216_sw_get_port_link, 
    872872}; 
    873873 
     
    10291029                goto err_free_priv; 
    10301030 
    1031         ret = ar8216_reset_switch(&priv->dev); 
     1031        ret = ar8216_sw_reset_switch(&priv->dev); 
    10321032        if (ret) 
    10331033                goto err_free_priv; 
Note: See TracChangeset for help on using the changeset viewer.