diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-05-10 17:27:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-05-11 19:36:28 -0400 |
commit | ff04955c2f678a2c4c3207e0184c4c389da9d1e2 (patch) | |
tree | d21e3cc6db20f9c3ed39ef72166cba7de56bd69e /net/dsa/slave.c | |
parent | c33063d6a0d83a553faacf32f3cb834e63d8ecd7 (diff) |
dsa: Rename switch chip data to cd
The dsa_switch structure contains a dsa_chip_data member called pd.
However in the rest of the code, pd is used for dsa_platform_data.
This is confusing. Rename it cd, which is already often used in dsa.c
and slave.c for this data type.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index f25dcd9e814a..152436cdab30 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c | |||
@@ -50,7 +50,7 @@ void dsa_slave_mii_bus_init(struct dsa_switch *ds) | |||
50 | ds->slave_mii_bus->read = dsa_slave_phy_read; | 50 | ds->slave_mii_bus->read = dsa_slave_phy_read; |
51 | ds->slave_mii_bus->write = dsa_slave_phy_write; | 51 | ds->slave_mii_bus->write = dsa_slave_phy_write; |
52 | snprintf(ds->slave_mii_bus->id, MII_BUS_ID_SIZE, "dsa-%d:%.2x", | 52 | snprintf(ds->slave_mii_bus->id, MII_BUS_ID_SIZE, "dsa-%d:%.2x", |
53 | ds->index, ds->pd->sw_addr); | 53 | ds->index, ds->cd->sw_addr); |
54 | ds->slave_mii_bus->parent = ds->dev; | 54 | ds->slave_mii_bus->parent = ds->dev; |
55 | ds->slave_mii_bus->phy_mask = ~ds->phys_mii_mask; | 55 | ds->slave_mii_bus->phy_mask = ~ds->phys_mii_mask; |
56 | } | 56 | } |
@@ -615,8 +615,8 @@ static int dsa_slave_get_eeprom_len(struct net_device *dev) | |||
615 | struct dsa_slave_priv *p = netdev_priv(dev); | 615 | struct dsa_slave_priv *p = netdev_priv(dev); |
616 | struct dsa_switch *ds = p->parent; | 616 | struct dsa_switch *ds = p->parent; |
617 | 617 | ||
618 | if (ds->pd->eeprom_len) | 618 | if (ds->cd->eeprom_len) |
619 | return ds->pd->eeprom_len; | 619 | return ds->cd->eeprom_len; |
620 | 620 | ||
621 | if (ds->drv->get_eeprom_len) | 621 | if (ds->drv->get_eeprom_len) |
622 | return ds->drv->get_eeprom_len(ds); | 622 | return ds->drv->get_eeprom_len(ds); |
@@ -999,7 +999,7 @@ static int dsa_slave_phy_setup(struct dsa_slave_priv *p, | |||
999 | struct net_device *slave_dev) | 999 | struct net_device *slave_dev) |
1000 | { | 1000 | { |
1001 | struct dsa_switch *ds = p->parent; | 1001 | struct dsa_switch *ds = p->parent; |
1002 | struct dsa_chip_data *cd = ds->pd; | 1002 | struct dsa_chip_data *cd = ds->cd; |
1003 | struct device_node *phy_dn, *port_dn; | 1003 | struct device_node *phy_dn, *port_dn; |
1004 | bool phy_is_fixed = false; | 1004 | bool phy_is_fixed = false; |
1005 | u32 phy_flags = 0; | 1005 | u32 phy_flags = 0; |
@@ -1147,7 +1147,7 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent, | |||
1147 | NULL); | 1147 | NULL); |
1148 | 1148 | ||
1149 | SET_NETDEV_DEV(slave_dev, parent); | 1149 | SET_NETDEV_DEV(slave_dev, parent); |
1150 | slave_dev->dev.of_node = ds->pd->port_dn[port]; | 1150 | slave_dev->dev.of_node = ds->cd->port_dn[port]; |
1151 | slave_dev->vlan_features = master->vlan_features; | 1151 | slave_dev->vlan_features = master->vlan_features; |
1152 | 1152 | ||
1153 | p = netdev_priv(slave_dev); | 1153 | p = netdev_priv(slave_dev); |