aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index c6791cd4ee05..1830f3199cb5 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -608,7 +608,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
608 int err = 0, i; 608 int err = 0, i;
609 struct net_device *dev = NULL; 609 struct net_device *dev = NULL;
610 struct gfar_private *priv = NULL; 610 struct gfar_private *priv = NULL;
611 struct device_node *np = ofdev->node; 611 struct device_node *np = ofdev->dev.of_node;
612 struct device_node *child = NULL; 612 struct device_node *child = NULL;
613 const u32 *stash; 613 const u32 *stash;
614 const u32 *stash_len; 614 const u32 *stash_len;
@@ -646,7 +646,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
646 return -ENOMEM; 646 return -ENOMEM;
647 647
648 priv = netdev_priv(dev); 648 priv = netdev_priv(dev);
649 priv->node = ofdev->node; 649 priv->node = ofdev->dev.of_node;
650 priv->ndev = dev; 650 priv->ndev = dev;
651 651
652 dev->num_tx_queues = num_tx_qs; 652 dev->num_tx_queues = num_tx_qs;
@@ -939,7 +939,7 @@ static int gfar_probe(struct of_device *ofdev,
939 priv = netdev_priv(dev); 939 priv = netdev_priv(dev);
940 priv->ndev = dev; 940 priv->ndev = dev;
941 priv->ofdev = ofdev; 941 priv->ofdev = ofdev;
942 priv->node = ofdev->node; 942 priv->node = ofdev->dev.of_node;
943 SET_NETDEV_DEV(dev, &ofdev->dev); 943 SET_NETDEV_DEV(dev, &ofdev->dev);
944 944
945 spin_lock_init(&priv->bflock); 945 spin_lock_init(&priv->bflock);
@@ -3167,12 +3167,14 @@ MODULE_DEVICE_TABLE(of, gfar_match);
3167 3167
3168/* Structure for a device driver */ 3168/* Structure for a device driver */
3169static struct of_platform_driver gfar_driver = { 3169static struct of_platform_driver gfar_driver = {
3170 .name = "fsl-gianfar", 3170 .driver = {
3171 .match_table = gfar_match, 3171 .name = "fsl-gianfar",
3172 3172 .owner = THIS_MODULE,
3173 .pm = GFAR_PM_OPS,
3174 .of_match_table = gfar_match,
3175 },
3173 .probe = gfar_probe, 3176 .probe = gfar_probe,
3174 .remove = gfar_remove, 3177 .remove = gfar_remove,
3175 .driver.pm = GFAR_PM_OPS,
3176}; 3178};
3177 3179
3178static int __init gfar_init(void) 3180static int __init gfar_init(void)