of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
@@ -136,7 +136,8 @@ static inline void emac_report_timeout_error(struct emac_instance *dev,
|
||||
EMAC_FTR_440EP_PHY_CLK_FIX))
|
||||
DBG(dev, "%s" NL, error);
|
||||
else if (net_ratelimit())
|
||||
printk(KERN_ERR "%s: %s\n", dev->ofdev->node->full_name, error);
|
||||
printk(KERN_ERR "%s: %s\n", dev->ofdev->dev.of_node->full_name,
|
||||
error);
|
||||
}
|
||||
|
||||
/* EMAC PHY clock workaround:
|
||||
@@ -2185,7 +2186,7 @@ static void emac_ethtool_get_drvinfo(struct net_device *ndev,
|
||||
strcpy(info->version, DRV_VERSION);
|
||||
info->fw_version[0] = '\0';
|
||||
sprintf(info->bus_info, "PPC 4xx EMAC-%d %s",
|
||||
dev->cell_index, dev->ofdev->node->full_name);
|
||||
dev->cell_index, dev->ofdev->dev.of_node->full_name);
|
||||
info->regdump_len = emac_ethtool_get_regs_len(ndev);
|
||||
}
|
||||
|
||||
@@ -2379,7 +2380,7 @@ static int __devinit emac_read_uint_prop(struct device_node *np, const char *nam
|
||||
|
||||
static int __devinit emac_init_phy(struct emac_instance *dev)
|
||||
{
|
||||
struct device_node *np = dev->ofdev->node;
|
||||
struct device_node *np = dev->ofdev->dev.of_node;
|
||||
struct net_device *ndev = dev->ndev;
|
||||
u32 phy_map, adv;
|
||||
int i;
|
||||
@@ -2514,7 +2515,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev)
|
||||
|
||||
static int __devinit emac_init_config(struct emac_instance *dev)
|
||||
{
|
||||
struct device_node *np = dev->ofdev->node;
|
||||
struct device_node *np = dev->ofdev->dev.of_node;
|
||||
const void *p;
|
||||
unsigned int plen;
|
||||
const char *pm, *phy_modes[] = {
|
||||
@@ -2723,7 +2724,7 @@ static int __devinit emac_probe(struct of_device *ofdev,
|
||||
{
|
||||
struct net_device *ndev;
|
||||
struct emac_instance *dev;
|
||||
struct device_node *np = ofdev->node;
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
struct device_node **blist = NULL;
|
||||
int err, i;
|
||||
|
||||
@@ -2810,7 +2811,7 @@ static int __devinit emac_probe(struct of_device *ofdev,
|
||||
err = mal_register_commac(dev->mal, &dev->commac);
|
||||
if (err) {
|
||||
printk(KERN_ERR "%s: failed to register with mal %s!\n",
|
||||
np->full_name, dev->mal_dev->node->full_name);
|
||||
np->full_name, dev->mal_dev->dev.of_node->full_name);
|
||||
goto err_rel_deps;
|
||||
}
|
||||
dev->rx_skb_size = emac_rx_skb_size(ndev->mtu);
|
||||
|
Reference in New Issue
Block a user