aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/mscan/mpc5xxx_can.c8
-rw-r--r--drivers/net/can/sja1000/sja1000_of_platform.c12
-rw-r--r--drivers/net/ehea/ehea_main.c21
-rw-r--r--drivers/net/fec_mpc52xx.c20
-rw-r--r--drivers/net/fec_mpc52xx_phy.c11
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c15
-rw-r--r--drivers/net/fs_enet/mac-fcc.c8
-rw-r--r--drivers/net/fs_enet/mac-fec.c4
-rw-r--r--drivers/net/fs_enet/mac-scc.c6
-rw-r--r--drivers/net/fs_enet/mii-bitbang.c7
-rw-r--r--drivers/net/fs_enet/mii-fec.c13
-rw-r--r--drivers/net/fsl_pq_mdio.c9
-rw-r--r--drivers/net/gianfar.c16
-rw-r--r--drivers/net/greth.c3
-rw-r--r--drivers/net/ibm_newemac/core.c21
-rw-r--r--drivers/net/ibm_newemac/debug.c9
-rw-r--r--drivers/net/ibm_newemac/debug.h4
-rw-r--r--drivers/net/ibm_newemac/mal.c36
-rw-r--r--drivers/net/ibm_newemac/rgmii.c20
-rw-r--r--drivers/net/ibm_newemac/tah.c15
-rw-r--r--drivers/net/ibm_newemac/zmii.c17
-rw-r--r--drivers/net/ll_temac_main.c12
-rw-r--r--drivers/net/myri_sbus.c9
-rw-r--r--drivers/net/niu.c17
-rw-r--r--drivers/net/phy/mdio-gpio.c13
-rw-r--r--drivers/net/sunbmac.c13
-rw-r--r--drivers/net/sunhme.c15
-rw-r--r--drivers/net/sunlance.c13
-rw-r--r--drivers/net/sunqe.c13
-rw-r--r--drivers/net/ucc_geth.c9
-rw-r--r--drivers/net/xilinx_emaclite.c17
31 files changed, 237 insertions, 169 deletions
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index 225fd147774a..8af8442c694a 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -392,15 +392,17 @@ static struct of_device_id __devinitdata mpc5xxx_can_table[] = {
392}; 392};
393 393
394static struct of_platform_driver mpc5xxx_can_driver = { 394static struct of_platform_driver mpc5xxx_can_driver = {
395 .owner = THIS_MODULE, 395 .driver = {
396 .name = "mpc5xxx_can", 396 .name = "mpc5xxx_can",
397 .owner = THIS_MODULE,
398 .of_match_table = mpc5xxx_can_table,
399 },
397 .probe = mpc5xxx_can_probe, 400 .probe = mpc5xxx_can_probe,
398 .remove = __devexit_p(mpc5xxx_can_remove), 401 .remove = __devexit_p(mpc5xxx_can_remove),
399#ifdef CONFIG_PM 402#ifdef CONFIG_PM
400 .suspend = mpc5xxx_can_suspend, 403 .suspend = mpc5xxx_can_suspend,
401 .resume = mpc5xxx_can_resume, 404 .resume = mpc5xxx_can_resume,
402#endif 405#endif
403 .match_table = mpc5xxx_can_table,
404}; 406};
405 407
406static int __init mpc5xxx_can_init(void) 408static int __init mpc5xxx_can_init(void)
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c
index 34e79efbd2fc..ac1a83d7c204 100644
--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -71,7 +71,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev)
71{ 71{
72 struct net_device *dev = dev_get_drvdata(&ofdev->dev); 72 struct net_device *dev = dev_get_drvdata(&ofdev->dev);
73 struct sja1000_priv *priv = netdev_priv(dev); 73 struct sja1000_priv *priv = netdev_priv(dev);
74 struct device_node *np = ofdev->node; 74 struct device_node *np = ofdev->dev.of_node;
75 struct resource res; 75 struct resource res;
76 76
77 dev_set_drvdata(&ofdev->dev, NULL); 77 dev_set_drvdata(&ofdev->dev, NULL);
@@ -90,7 +90,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev)
90static int __devinit sja1000_ofp_probe(struct of_device *ofdev, 90static int __devinit sja1000_ofp_probe(struct of_device *ofdev,
91 const struct of_device_id *id) 91 const struct of_device_id *id)
92{ 92{
93 struct device_node *np = ofdev->node; 93 struct device_node *np = ofdev->dev.of_node;
94 struct net_device *dev; 94 struct net_device *dev;
95 struct sja1000_priv *priv; 95 struct sja1000_priv *priv;
96 struct resource res; 96 struct resource res;
@@ -215,11 +215,13 @@ static struct of_device_id __devinitdata sja1000_ofp_table[] = {
215MODULE_DEVICE_TABLE(of, sja1000_ofp_table); 215MODULE_DEVICE_TABLE(of, sja1000_ofp_table);
216 216
217static struct of_platform_driver sja1000_ofp_driver = { 217static struct of_platform_driver sja1000_ofp_driver = {
218 .owner = THIS_MODULE, 218 .driver = {
219 .name = DRV_NAME, 219 .owner = THIS_MODULE,
220 .name = DRV_NAME,
221 .of_match_table = sja1000_ofp_table,
222 },
220 .probe = sja1000_ofp_probe, 223 .probe = sja1000_ofp_probe,
221 .remove = __devexit_p(sja1000_ofp_remove), 224 .remove = __devexit_p(sja1000_ofp_remove),
222 .match_table = sja1000_ofp_table,
223}; 225};
224 226
225static int __init sja1000_ofp_init(void) 227static int __init sja1000_ofp_init(void)
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 02698a1c80b0..f547894ff48f 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -122,8 +122,11 @@ static struct of_device_id ehea_device_table[] = {
122MODULE_DEVICE_TABLE(of, ehea_device_table); 122MODULE_DEVICE_TABLE(of, ehea_device_table);
123 123
124static struct of_platform_driver ehea_driver = { 124static struct of_platform_driver ehea_driver = {
125 .name = "ehea", 125 .driver = {
126 .match_table = ehea_device_table, 126 .name = "ehea",
127 .owner = THIS_MODULE,
128 .of_match_table = ehea_device_table,
129 },
127 .probe = ehea_probe_adapter, 130 .probe = ehea_probe_adapter,
128 .remove = ehea_remove, 131 .remove = ehea_remove,
129}; 132};
@@ -3050,7 +3053,7 @@ static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | S_IROTH, ehea_show_port_id,
3050static void __devinit logical_port_release(struct device *dev) 3053static void __devinit logical_port_release(struct device *dev)
3051{ 3054{
3052 struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev); 3055 struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev);
3053 of_node_put(port->ofdev.node); 3056 of_node_put(port->ofdev.dev.of_node);
3054} 3057}
3055 3058
3056static struct device *ehea_register_port(struct ehea_port *port, 3059static struct device *ehea_register_port(struct ehea_port *port,
@@ -3058,7 +3061,7 @@ static struct device *ehea_register_port(struct ehea_port *port,
3058{ 3061{
3059 int ret; 3062 int ret;
3060 3063
3061 port->ofdev.node = of_node_get(dn); 3064 port->ofdev.dev.of_node = of_node_get(dn);
3062 port->ofdev.dev.parent = &port->adapter->ofdev->dev; 3065 port->ofdev.dev.parent = &port->adapter->ofdev->dev;
3063 port->ofdev.dev.bus = &ibmebus_bus_type; 3066 port->ofdev.dev.bus = &ibmebus_bus_type;
3064 3067
@@ -3225,7 +3228,7 @@ static int ehea_setup_ports(struct ehea_adapter *adapter)
3225 const u32 *dn_log_port_id; 3228 const u32 *dn_log_port_id;
3226 int i = 0; 3229 int i = 0;
3227 3230
3228 lhea_dn = adapter->ofdev->node; 3231 lhea_dn = adapter->ofdev->dev.of_node;
3229 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { 3232 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
3230 3233
3231 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", 3234 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
@@ -3264,7 +3267,7 @@ static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter,
3264 struct device_node *eth_dn = NULL; 3267 struct device_node *eth_dn = NULL;
3265 const u32 *dn_log_port_id; 3268 const u32 *dn_log_port_id;
3266 3269
3267 lhea_dn = adapter->ofdev->node; 3270 lhea_dn = adapter->ofdev->dev.of_node;
3268 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { 3271 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
3269 3272
3270 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", 3273 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
@@ -3394,7 +3397,7 @@ static int __devinit ehea_probe_adapter(struct of_device *dev,
3394 const u64 *adapter_handle; 3397 const u64 *adapter_handle;
3395 int ret; 3398 int ret;
3396 3399
3397 if (!dev || !dev->node) { 3400 if (!dev || !dev->dev.of_node) {
3398 ehea_error("Invalid ibmebus device probed"); 3401 ehea_error("Invalid ibmebus device probed");
3399 return -EINVAL; 3402 return -EINVAL;
3400 } 3403 }
@@ -3410,14 +3413,14 @@ static int __devinit ehea_probe_adapter(struct of_device *dev,
3410 3413
3411 adapter->ofdev = dev; 3414 adapter->ofdev = dev;
3412 3415
3413 adapter_handle = of_get_property(dev->node, "ibm,hea-handle", 3416 adapter_handle = of_get_property(dev->dev.of_node, "ibm,hea-handle",
3414 NULL); 3417 NULL);
3415 if (adapter_handle) 3418 if (adapter_handle)
3416 adapter->handle = *adapter_handle; 3419 adapter->handle = *adapter_handle;
3417 3420
3418 if (!adapter->handle) { 3421 if (!adapter->handle) {
3419 dev_err(&dev->dev, "failed getting handle for adapter" 3422 dev_err(&dev->dev, "failed getting handle for adapter"
3420 " '%s'\n", dev->node->full_name); 3423 " '%s'\n", dev->dev.of_node->full_name);
3421 ret = -ENODEV; 3424 ret = -ENODEV;
3422 goto out_free_ad; 3425 goto out_free_ad;
3423 } 3426 }
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index 221f440c10f4..25e6cc6840b1 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -871,7 +871,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
871 priv->ndev = ndev; 871 priv->ndev = ndev;
872 872
873 /* Reserve FEC control zone */ 873 /* Reserve FEC control zone */
874 rv = of_address_to_resource(op->node, 0, &mem); 874 rv = of_address_to_resource(op->dev.of_node, 0, &mem);
875 if (rv) { 875 if (rv) {
876 printk(KERN_ERR DRIVER_NAME ": " 876 printk(KERN_ERR DRIVER_NAME ": "
877 "Error while parsing device node resource\n" ); 877 "Error while parsing device node resource\n" );
@@ -919,7 +919,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
919 919
920 /* Get the IRQ we need one by one */ 920 /* Get the IRQ we need one by one */
921 /* Control */ 921 /* Control */
922 ndev->irq = irq_of_parse_and_map(op->node, 0); 922 ndev->irq = irq_of_parse_and_map(op->dev.of_node, 0);
923 923
924 /* RX */ 924 /* RX */
925 priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk); 925 priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk);
@@ -942,20 +942,20 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
942 /* Start with safe defaults for link connection */ 942 /* Start with safe defaults for link connection */
943 priv->speed = 100; 943 priv->speed = 100;
944 priv->duplex = DUPLEX_HALF; 944 priv->duplex = DUPLEX_HALF;
945 priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->node) >> 20) / 5) << 1; 945 priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->dev.of_node) >> 20) / 5) << 1;
946 946
947 /* The current speed preconfigures the speed of the MII link */ 947 /* The current speed preconfigures the speed of the MII link */
948 prop = of_get_property(op->node, "current-speed", &prop_size); 948 prop = of_get_property(op->dev.of_node, "current-speed", &prop_size);
949 if (prop && (prop_size >= sizeof(u32) * 2)) { 949 if (prop && (prop_size >= sizeof(u32) * 2)) {
950 priv->speed = prop[0]; 950 priv->speed = prop[0];
951 priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF; 951 priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF;
952 } 952 }
953 953
954 /* If there is a phy handle, then get the PHY node */ 954 /* If there is a phy handle, then get the PHY node */
955 priv->phy_node = of_parse_phandle(op->node, "phy-handle", 0); 955 priv->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0);
956 956
957 /* the 7-wire property means don't use MII mode */ 957 /* the 7-wire property means don't use MII mode */
958 if (of_find_property(op->node, "fsl,7-wire-mode", NULL)) { 958 if (of_find_property(op->dev.of_node, "fsl,7-wire-mode", NULL)) {
959 priv->seven_wire_mode = 1; 959 priv->seven_wire_mode = 1;
960 dev_info(&ndev->dev, "using 7-wire PHY mode\n"); 960 dev_info(&ndev->dev, "using 7-wire PHY mode\n");
961 } 961 }
@@ -1063,9 +1063,11 @@ static struct of_device_id mpc52xx_fec_match[] = {
1063MODULE_DEVICE_TABLE(of, mpc52xx_fec_match); 1063MODULE_DEVICE_TABLE(of, mpc52xx_fec_match);
1064 1064
1065static struct of_platform_driver mpc52xx_fec_driver = { 1065static struct of_platform_driver mpc52xx_fec_driver = {
1066 .owner = THIS_MODULE, 1066 .driver = {
1067 .name = DRIVER_NAME, 1067 .name = DRIVER_NAME,
1068 .match_table = mpc52xx_fec_match, 1068 .owner = THIS_MODULE,
1069 .of_match_table = mpc52xx_fec_match,
1070 },
1069 .probe = mpc52xx_fec_probe, 1071 .probe = mpc52xx_fec_probe,
1070 .remove = mpc52xx_fec_remove, 1072 .remove = mpc52xx_fec_remove,
1071#ifdef CONFIG_PM 1073#ifdef CONFIG_PM
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c
index 7658a082e390..006f64d9f96a 100644
--- a/drivers/net/fec_mpc52xx_phy.c
+++ b/drivers/net/fec_mpc52xx_phy.c
@@ -66,7 +66,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
66 const struct of_device_id *match) 66 const struct of_device_id *match)
67{ 67{
68 struct device *dev = &of->dev; 68 struct device *dev = &of->dev;
69 struct device_node *np = of->node; 69 struct device_node *np = of->dev.of_node;
70 struct mii_bus *bus; 70 struct mii_bus *bus;
71 struct mpc52xx_fec_mdio_priv *priv; 71 struct mpc52xx_fec_mdio_priv *priv;
72 struct resource res = {}; 72 struct resource res = {};
@@ -107,7 +107,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
107 107
108 /* set MII speed */ 108 /* set MII speed */
109 out_be32(&priv->regs->mii_speed, 109 out_be32(&priv->regs->mii_speed,
110 ((mpc5xxx_get_bus_frequency(of->node) >> 20) / 5) << 1); 110 ((mpc5xxx_get_bus_frequency(of->dev.of_node) >> 20) / 5) << 1);
111 111
112 err = of_mdiobus_register(bus, np); 112 err = of_mdiobus_register(bus, np);
113 if (err) 113 if (err)
@@ -159,10 +159,13 @@ static struct of_device_id mpc52xx_fec_mdio_match[] = {
159MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match); 159MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match);
160 160
161struct of_platform_driver mpc52xx_fec_mdio_driver = { 161struct of_platform_driver mpc52xx_fec_mdio_driver = {
162 .name = "mpc5200b-fec-phy", 162 .driver = {
163 .name = "mpc5200b-fec-phy",
164 .owner = THIS_MODULE,
165 .of_match_table = mpc52xx_fec_mdio_match,
166 },
163 .probe = mpc52xx_fec_mdio_probe, 167 .probe = mpc52xx_fec_mdio_probe,
164 .remove = mpc52xx_fec_mdio_remove, 168 .remove = mpc52xx_fec_mdio_remove,
165 .match_table = mpc52xx_fec_mdio_match,
166}; 169};
167 170
168/* let fec driver call it, since this has to be registered before it */ 171/* let fec driver call it, since this has to be registered before it */
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index 0fb0fefcb787..309a0eaddd81 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -1013,7 +1013,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
1013 return -ENOMEM; 1013 return -ENOMEM;
1014 1014
1015 if (!IS_FEC(match)) { 1015 if (!IS_FEC(match)) {
1016 data = of_get_property(ofdev->node, "fsl,cpm-command", &len); 1016 data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len);
1017 if (!data || len != 4) 1017 if (!data || len != 4)
1018 goto out_free_fpi; 1018 goto out_free_fpi;
1019 1019
@@ -1025,8 +1025,8 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
1025 fpi->rx_copybreak = 240; 1025 fpi->rx_copybreak = 240;
1026 fpi->use_napi = 1; 1026 fpi->use_napi = 1;
1027 fpi->napi_weight = 17; 1027 fpi->napi_weight = 17;
1028 fpi->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0); 1028 fpi->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0);
1029 if ((!fpi->phy_node) && (!of_get_property(ofdev->node, "fixed-link", 1029 if ((!fpi->phy_node) && (!of_get_property(ofdev->dev.of_node, "fixed-link",
1030 NULL))) 1030 NULL)))
1031 goto out_free_fpi; 1031 goto out_free_fpi;
1032 1032
@@ -1059,7 +1059,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
1059 spin_lock_init(&fep->lock); 1059 spin_lock_init(&fep->lock);
1060 spin_lock_init(&fep->tx_lock); 1060 spin_lock_init(&fep->tx_lock);
1061 1061
1062 mac_addr = of_get_mac_address(ofdev->node); 1062 mac_addr = of_get_mac_address(ofdev->dev.of_node);
1063 if (mac_addr) 1063 if (mac_addr)
1064 memcpy(ndev->dev_addr, mac_addr, 6); 1064 memcpy(ndev->dev_addr, mac_addr, 6);
1065 1065
@@ -1156,8 +1156,11 @@ static struct of_device_id fs_enet_match[] = {
1156MODULE_DEVICE_TABLE(of, fs_enet_match); 1156MODULE_DEVICE_TABLE(of, fs_enet_match);
1157 1157
1158static struct of_platform_driver fs_enet_driver = { 1158static struct of_platform_driver fs_enet_driver = {
1159 .name = "fs_enet", 1159 .driver = {
1160 .match_table = fs_enet_match, 1160 .owner = THIS_MODULE,
1161 .name = "fs_enet",
1162 .of_match_table = fs_enet_match,
1163 },
1161 .probe = fs_enet_probe, 1164 .probe = fs_enet_probe,
1162 .remove = fs_enet_remove, 1165 .remove = fs_enet_remove,
1163}; 1166};
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c
index 714da967fa19..5d45084b287d 100644
--- a/drivers/net/fs_enet/mac-fcc.c
+++ b/drivers/net/fs_enet/mac-fcc.c
@@ -88,19 +88,19 @@ static int do_pd_setup(struct fs_enet_private *fep)
88 struct fs_platform_info *fpi = fep->fpi; 88 struct fs_platform_info *fpi = fep->fpi;
89 int ret = -EINVAL; 89 int ret = -EINVAL;
90 90
91 fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); 91 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
92 if (fep->interrupt == NO_IRQ) 92 if (fep->interrupt == NO_IRQ)
93 goto out; 93 goto out;
94 94
95 fep->fcc.fccp = of_iomap(ofdev->node, 0); 95 fep->fcc.fccp = of_iomap(ofdev->dev.of_node, 0);
96 if (!fep->fcc.fccp) 96 if (!fep->fcc.fccp)
97 goto out; 97 goto out;
98 98
99 fep->fcc.ep = of_iomap(ofdev->node, 1); 99 fep->fcc.ep = of_iomap(ofdev->dev.of_node, 1);
100 if (!fep->fcc.ep) 100 if (!fep->fcc.ep)
101 goto out_fccp; 101 goto out_fccp;
102 102
103 fep->fcc.fcccp = of_iomap(ofdev->node, 2); 103 fep->fcc.fcccp = of_iomap(ofdev->dev.of_node, 2);
104 if (!fep->fcc.fcccp) 104 if (!fep->fcc.fcccp)
105 goto out_ep; 105 goto out_ep;
106 106
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c
index 7eff92ef01da..7ca1642276d0 100644
--- a/drivers/net/fs_enet/mac-fec.c
+++ b/drivers/net/fs_enet/mac-fec.c
@@ -98,11 +98,11 @@ static int do_pd_setup(struct fs_enet_private *fep)
98{ 98{
99 struct of_device *ofdev = to_of_device(fep->dev); 99 struct of_device *ofdev = to_of_device(fep->dev);
100 100
101 fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); 101 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
102 if (fep->interrupt == NO_IRQ) 102 if (fep->interrupt == NO_IRQ)
103 return -EINVAL; 103 return -EINVAL;
104 104
105 fep->fec.fecp = of_iomap(ofdev->node, 0); 105 fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0);
106 if (!fep->fcc.fccp) 106 if (!fep->fcc.fccp)
107 return -EINVAL; 107 return -EINVAL;
108 108
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index 7f0591e43cd9..a3c44544846d 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -98,15 +98,15 @@ static int do_pd_setup(struct fs_enet_private *fep)
98{ 98{
99 struct of_device *ofdev = to_of_device(fep->dev); 99 struct of_device *ofdev = to_of_device(fep->dev);
100 100
101 fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); 101 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
102 if (fep->interrupt == NO_IRQ) 102 if (fep->interrupt == NO_IRQ)
103 return -EINVAL; 103 return -EINVAL;
104 104
105 fep->scc.sccp = of_iomap(ofdev->node, 0); 105 fep->scc.sccp = of_iomap(ofdev->dev.of_node, 0);
106 if (!fep->scc.sccp) 106 if (!fep->scc.sccp)
107 return -EINVAL; 107 return -EINVAL;
108 108
109 fep->scc.ep = of_iomap(ofdev->node, 1); 109 fep->scc.ep = of_iomap(ofdev->dev.of_node, 1);
110 if (!fep->scc.ep) { 110 if (!fep->scc.ep) {
111 iounmap(fep->scc.sccp); 111 iounmap(fep->scc.sccp);
112 return -EINVAL; 112 return -EINVAL;
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c
index 24ff9f43a62b..0f90685d3d19 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -224,8 +224,11 @@ static struct of_device_id fs_enet_mdio_bb_match[] = {
224MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match); 224MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match);
225 225
226static struct of_platform_driver fs_enet_bb_mdio_driver = { 226static struct of_platform_driver fs_enet_bb_mdio_driver = {
227 .name = "fsl-bb-mdio", 227 .driver = {
228 .match_table = fs_enet_mdio_bb_match, 228 .name = "fsl-bb-mdio",
229 .owner = THIS_MODULE,
230 .of_match_table = fs_enet_mdio_bb_match,
231 },
229 .probe = fs_enet_mdio_probe, 232 .probe = fs_enet_mdio_probe,
230 .remove = fs_enet_mdio_remove, 233 .remove = fs_enet_mdio_remove,
231}; 234};
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c
index 5944b65082cb..bddffd169b93 100644
--- a/drivers/net/fs_enet/mii-fec.c
+++ b/drivers/net/fs_enet/mii-fec.c
@@ -124,7 +124,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
124 new_bus->write = &fs_enet_fec_mii_write; 124 new_bus->write = &fs_enet_fec_mii_write;
125 new_bus->reset = &fs_enet_fec_mii_reset; 125 new_bus->reset = &fs_enet_fec_mii_reset;
126 126
127 ret = of_address_to_resource(ofdev->node, 0, &res); 127 ret = of_address_to_resource(ofdev->dev.of_node, 0, &res);
128 if (ret) 128 if (ret)
129 goto out_res; 129 goto out_res;
130 130
@@ -135,7 +135,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
135 goto out_fec; 135 goto out_fec;
136 136
137 if (get_bus_freq) { 137 if (get_bus_freq) {
138 clock = get_bus_freq(ofdev->node); 138 clock = get_bus_freq(ofdev->dev.of_node);
139 if (!clock) { 139 if (!clock) {
140 /* Use maximum divider if clock is unknown */ 140 /* Use maximum divider if clock is unknown */
141 dev_warn(&ofdev->dev, "could not determine IPS clock\n"); 141 dev_warn(&ofdev->dev, "could not determine IPS clock\n");
@@ -172,7 +172,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
172 new_bus->parent = &ofdev->dev; 172 new_bus->parent = &ofdev->dev;
173 dev_set_drvdata(&ofdev->dev, new_bus); 173 dev_set_drvdata(&ofdev->dev, new_bus);
174 174
175 ret = of_mdiobus_register(new_bus, ofdev->node); 175 ret = of_mdiobus_register(new_bus, ofdev->dev.of_node);
176 if (ret) 176 if (ret)
177 goto out_free_irqs; 177 goto out_free_irqs;
178 178
@@ -222,8 +222,11 @@ static struct of_device_id fs_enet_mdio_fec_match[] = {
222MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match); 222MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match);
223 223
224static struct of_platform_driver fs_enet_fec_mdio_driver = { 224static struct of_platform_driver fs_enet_fec_mdio_driver = {
225 .name = "fsl-fec-mdio", 225 .driver = {
226 .match_table = fs_enet_mdio_fec_match, 226 .name = "fsl-fec-mdio",
227 .owner = THIS_MODULE,
228 .of_match_table = fs_enet_mdio_fec_match,
229 },
227 .probe = fs_enet_mdio_probe, 230 .probe = fs_enet_mdio_probe,
228 .remove = fs_enet_mdio_remove, 231 .remove = fs_enet_mdio_remove,
229}; 232};
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c
index ff028f59b930..b4c41d72c423 100644
--- a/drivers/net/fsl_pq_mdio.c
+++ b/drivers/net/fsl_pq_mdio.c
@@ -267,7 +267,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
267static int fsl_pq_mdio_probe(struct of_device *ofdev, 267static int fsl_pq_mdio_probe(struct of_device *ofdev,
268 const struct of_device_id *match) 268 const struct of_device_id *match)
269{ 269{
270 struct device_node *np = ofdev->node; 270 struct device_node *np = ofdev->dev.of_node;
271 struct device_node *tbi; 271 struct device_node *tbi;
272 struct fsl_pq_mdio_priv *priv; 272 struct fsl_pq_mdio_priv *priv;
273 struct fsl_pq_mdio __iomem *regs = NULL; 273 struct fsl_pq_mdio __iomem *regs = NULL;
@@ -471,10 +471,13 @@ static struct of_device_id fsl_pq_mdio_match[] = {
471MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match); 471MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match);
472 472
473static struct of_platform_driver fsl_pq_mdio_driver = { 473static struct of_platform_driver fsl_pq_mdio_driver = {
474 .name = "fsl-pq_mdio", 474 .driver = {
475 .name = "fsl-pq_mdio",
476 .owner = THIS_MODULE,
477 .of_match_table = fsl_pq_mdio_match,
478 },
475 .probe = fsl_pq_mdio_probe, 479 .probe = fsl_pq_mdio_probe,
476 .remove = fsl_pq_mdio_remove, 480 .remove = fsl_pq_mdio_remove,
477 .match_table = fsl_pq_mdio_match,
478}; 481};
479 482
480int __init fsl_pq_mdio_init(void) 483int __init fsl_pq_mdio_init(void)
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)
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index fd491e409488..f37a4c143ddd 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -1499,7 +1499,8 @@ static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_dev
1499 if (i == 6) { 1499 if (i == 6) {
1500 const unsigned char *addr; 1500 const unsigned char *addr;
1501 int len; 1501 int len;
1502 addr = of_get_property(ofdev->node, "local-mac-address", &len); 1502 addr = of_get_property(ofdev->dev.of_node, "local-mac-address",
1503 &len);
1503 if (addr != NULL && len == 6) { 1504 if (addr != NULL && len == 6) {
1504 for (i = 0; i < 6; i++) 1505 for (i = 0; i < 6; i++)
1505 macaddr[i] = (unsigned int) addr[i]; 1506 macaddr[i] = (unsigned int) addr[i];
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index 2484e9e6c1ed..b150c102ca5a 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -136,7 +136,8 @@ static inline void emac_report_timeout_error(struct emac_instance *dev,
136 EMAC_FTR_440EP_PHY_CLK_FIX)) 136 EMAC_FTR_440EP_PHY_CLK_FIX))
137 DBG(dev, "%s" NL, error); 137 DBG(dev, "%s" NL, error);
138 else if (net_ratelimit()) 138 else if (net_ratelimit())
139 printk(KERN_ERR "%s: %s\n", dev->ofdev->node->full_name, error); 139 printk(KERN_ERR "%s: %s\n", dev->ofdev->dev.of_node->full_name,
140 error);
140} 141}
141 142
142/* EMAC PHY clock workaround: 143/* EMAC PHY clock workaround:
@@ -2185,7 +2186,7 @@ static void emac_ethtool_get_drvinfo(struct net_device *ndev,
2185 strcpy(info->version, DRV_VERSION); 2186 strcpy(info->version, DRV_VERSION);
2186 info->fw_version[0] = '\0'; 2187 info->fw_version[0] = '\0';
2187 sprintf(info->bus_info, "PPC 4xx EMAC-%d %s", 2188 sprintf(info->bus_info, "PPC 4xx EMAC-%d %s",
2188 dev->cell_index, dev->ofdev->node->full_name); 2189 dev->cell_index, dev->ofdev->dev.of_node->full_name);
2189 info->regdump_len = emac_ethtool_get_regs_len(ndev); 2190 info->regdump_len = emac_ethtool_get_regs_len(ndev);
2190} 2191}
2191 2192
@@ -2379,7 +2380,7 @@ static int __devinit emac_read_uint_prop(struct device_node *np, const char *nam
2379 2380
2380static int __devinit emac_init_phy(struct emac_instance *dev) 2381static int __devinit emac_init_phy(struct emac_instance *dev)
2381{ 2382{
2382 struct device_node *np = dev->ofdev->node; 2383 struct device_node *np = dev->ofdev->dev.of_node;
2383 struct net_device *ndev = dev->ndev; 2384 struct net_device *ndev = dev->ndev;
2384 u32 phy_map, adv; 2385 u32 phy_map, adv;
2385 int i; 2386 int i;
@@ -2514,7 +2515,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev)
2514 2515
2515static int __devinit emac_init_config(struct emac_instance *dev) 2516static int __devinit emac_init_config(struct emac_instance *dev)
2516{ 2517{
2517 struct device_node *np = dev->ofdev->node; 2518 struct device_node *np = dev->ofdev->dev.of_node;
2518 const void *p; 2519 const void *p;
2519 unsigned int plen; 2520 unsigned int plen;
2520 const char *pm, *phy_modes[] = { 2521 const char *pm, *phy_modes[] = {
@@ -2723,7 +2724,7 @@ static int __devinit emac_probe(struct of_device *ofdev,
2723{ 2724{
2724 struct net_device *ndev; 2725 struct net_device *ndev;
2725 struct emac_instance *dev; 2726 struct emac_instance *dev;
2726 struct device_node *np = ofdev->node; 2727 struct device_node *np = ofdev->dev.of_node;
2727 struct device_node **blist = NULL; 2728 struct device_node **blist = NULL;
2728 int err, i; 2729 int err, i;
2729 2730
@@ -2810,7 +2811,7 @@ static int __devinit emac_probe(struct of_device *ofdev,
2810 err = mal_register_commac(dev->mal, &dev->commac); 2811 err = mal_register_commac(dev->mal, &dev->commac);
2811 if (err) { 2812 if (err) {
2812 printk(KERN_ERR "%s: failed to register with mal %s!\n", 2813 printk(KERN_ERR "%s: failed to register with mal %s!\n",
2813 np->full_name, dev->mal_dev->node->full_name); 2814 np->full_name, dev->mal_dev->dev.of_node->full_name);
2814 goto err_rel_deps; 2815 goto err_rel_deps;
2815 } 2816 }
2816 dev->rx_skb_size = emac_rx_skb_size(ndev->mtu); 2817 dev->rx_skb_size = emac_rx_skb_size(ndev->mtu);
@@ -2995,9 +2996,11 @@ static struct of_device_id emac_match[] =
2995MODULE_DEVICE_TABLE(of, emac_match); 2996MODULE_DEVICE_TABLE(of, emac_match);
2996 2997
2997static struct of_platform_driver emac_driver = { 2998static struct of_platform_driver emac_driver = {
2998 .name = "emac", 2999 .driver = {
2999 .match_table = emac_match, 3000 .name = "emac",
3000 3001 .owner = THIS_MODULE,
3002 .of_match_table = emac_match,
3003 },
3001 .probe = emac_probe, 3004 .probe = emac_probe,
3002 .remove = emac_remove, 3005 .remove = emac_remove,
3003}; 3006};
diff --git a/drivers/net/ibm_newemac/debug.c b/drivers/net/ibm_newemac/debug.c
index 775c850a425a..3995fafc1e08 100644
--- a/drivers/net/ibm_newemac/debug.c
+++ b/drivers/net/ibm_newemac/debug.c
@@ -33,7 +33,7 @@ static void emac_desc_dump(struct emac_instance *p)
33 int i; 33 int i;
34 printk("** EMAC %s TX BDs **\n" 34 printk("** EMAC %s TX BDs **\n"
35 " tx_cnt = %d tx_slot = %d ack_slot = %d\n", 35 " tx_cnt = %d tx_slot = %d ack_slot = %d\n",
36 p->ofdev->node->full_name, 36 p->ofdev->dev.of_node->full_name,
37 p->tx_cnt, p->tx_slot, p->ack_slot); 37 p->tx_cnt, p->tx_slot, p->ack_slot);
38 for (i = 0; i < NUM_TX_BUFF / 2; ++i) 38 for (i = 0; i < NUM_TX_BUFF / 2; ++i)
39 printk 39 printk
@@ -49,7 +49,7 @@ static void emac_desc_dump(struct emac_instance *p)
49 printk("** EMAC %s RX BDs **\n" 49 printk("** EMAC %s RX BDs **\n"
50 " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n" 50 " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n"
51 " rx_sg_skb = 0x%p\n", 51 " rx_sg_skb = 0x%p\n",
52 p->ofdev->node->full_name, 52 p->ofdev->dev.of_node->full_name,
53 p->rx_slot, p->commac.flags, p->rx_skb_size, 53 p->rx_slot, p->commac.flags, p->rx_skb_size,
54 p->rx_sync_size, p->rx_sg_skb); 54 p->rx_sync_size, p->rx_sg_skb);
55 for (i = 0; i < NUM_RX_BUFF / 2; ++i) 55 for (i = 0; i < NUM_RX_BUFF / 2; ++i)
@@ -77,7 +77,8 @@ static void emac_mac_dump(struct emac_instance *dev)
77 "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n" 77 "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n"
78 "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n" 78 "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n"
79 "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n", 79 "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n",
80 dev->ofdev->node->full_name, in_be32(&p->mr0), in_be32(&p->mr1), 80 dev->ofdev->dev.of_node->full_name,
81 in_be32(&p->mr0), in_be32(&p->mr1),
81 in_be32(&p->tmr0), in_be32(&p->tmr1), 82 in_be32(&p->tmr0), in_be32(&p->tmr1),
82 in_be32(&p->rmr), in_be32(&p->isr), in_be32(&p->iser), 83 in_be32(&p->rmr), in_be32(&p->isr), in_be32(&p->iser),
83 in_be32(&p->iahr), in_be32(&p->ialr), in_be32(&p->vtpid), 84 in_be32(&p->iahr), in_be32(&p->ialr), in_be32(&p->vtpid),
@@ -128,7 +129,7 @@ static void emac_mal_dump(struct mal_instance *mal)
128 "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n" 129 "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n"
129 "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n" 130 "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n"
130 "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n", 131 "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n",
131 mal->ofdev->node->full_name, 132 mal->ofdev->dev.of_node->full_name,
132 get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR), 133 get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR),
133 get_mal_dcrn(mal, MAL_IER), 134 get_mal_dcrn(mal, MAL_IER),
134 get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR), 135 get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR),
diff --git a/drivers/net/ibm_newemac/debug.h b/drivers/net/ibm_newemac/debug.h
index b631842ec8d0..e596c77ccdf7 100644
--- a/drivers/net/ibm_newemac/debug.h
+++ b/drivers/net/ibm_newemac/debug.h
@@ -53,8 +53,8 @@ extern void emac_dbg_dump_all(void);
53 53
54#endif 54#endif
55 55
56#define EMAC_DBG(dev, name, fmt, arg...) \ 56#define EMAC_DBG(d, name, fmt, arg...) \
57 printk(KERN_DEBUG #name "%s: " fmt, dev->ofdev->node->full_name, ## arg) 57 printk(KERN_DEBUG #name "%s: " fmt, d->ofdev->dev.of_node->full_name, ## arg)
58 58
59#if DBG_LEVEL > 0 59#if DBG_LEVEL > 0
60# define DBG(d,f,x...) EMAC_DBG(d, emac, f, ##x) 60# define DBG(d,f,x...) EMAC_DBG(d, emac, f, ##x)
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c
index 5b3d94419fe6..fcff9e0bd382 100644
--- a/drivers/net/ibm_newemac/mal.c
+++ b/drivers/net/ibm_newemac/mal.c
@@ -538,11 +538,11 @@ static int __devinit mal_probe(struct of_device *ofdev,
538 } 538 }
539 mal->index = index; 539 mal->index = index;
540 mal->ofdev = ofdev; 540 mal->ofdev = ofdev;
541 mal->version = of_device_is_compatible(ofdev->node, "ibm,mcmal2") ? 2 : 1; 541 mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1;
542 542
543 MAL_DBG(mal, "probe" NL); 543 MAL_DBG(mal, "probe" NL);
544 544
545 prop = of_get_property(ofdev->node, "num-tx-chans", NULL); 545 prop = of_get_property(ofdev->dev.of_node, "num-tx-chans", NULL);
546 if (prop == NULL) { 546 if (prop == NULL) {
547 printk(KERN_ERR 547 printk(KERN_ERR
548 "mal%d: can't find MAL num-tx-chans property!\n", 548 "mal%d: can't find MAL num-tx-chans property!\n",
@@ -552,7 +552,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
552 } 552 }
553 mal->num_tx_chans = prop[0]; 553 mal->num_tx_chans = prop[0];
554 554
555 prop = of_get_property(ofdev->node, "num-rx-chans", NULL); 555 prop = of_get_property(ofdev->dev.of_node, "num-rx-chans", NULL);
556 if (prop == NULL) { 556 if (prop == NULL) {
557 printk(KERN_ERR 557 printk(KERN_ERR
558 "mal%d: can't find MAL num-rx-chans property!\n", 558 "mal%d: can't find MAL num-rx-chans property!\n",
@@ -562,14 +562,14 @@ static int __devinit mal_probe(struct of_device *ofdev,
562 } 562 }
563 mal->num_rx_chans = prop[0]; 563 mal->num_rx_chans = prop[0];
564 564
565 dcr_base = dcr_resource_start(ofdev->node, 0); 565 dcr_base = dcr_resource_start(ofdev->dev.of_node, 0);
566 if (dcr_base == 0) { 566 if (dcr_base == 0) {
567 printk(KERN_ERR 567 printk(KERN_ERR
568 "mal%d: can't find DCR resource!\n", index); 568 "mal%d: can't find DCR resource!\n", index);
569 err = -ENODEV; 569 err = -ENODEV;
570 goto fail; 570 goto fail;
571 } 571 }
572 mal->dcr_host = dcr_map(ofdev->node, dcr_base, 0x100); 572 mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100);
573 if (!DCR_MAP_OK(mal->dcr_host)) { 573 if (!DCR_MAP_OK(mal->dcr_host)) {
574 printk(KERN_ERR 574 printk(KERN_ERR
575 "mal%d: failed to map DCRs !\n", index); 575 "mal%d: failed to map DCRs !\n", index);
@@ -577,28 +577,28 @@ static int __devinit mal_probe(struct of_device *ofdev,
577 goto fail; 577 goto fail;
578 } 578 }
579 579
580 if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) { 580 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) {
581#if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \ 581#if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \
582 defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR) 582 defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR)
583 mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | 583 mal->features |= (MAL_FTR_CLEAR_ICINTSTAT |
584 MAL_FTR_COMMON_ERR_INT); 584 MAL_FTR_COMMON_ERR_INT);
585#else 585#else
586 printk(KERN_ERR "%s: Support for 405EZ not enabled!\n", 586 printk(KERN_ERR "%s: Support for 405EZ not enabled!\n",
587 ofdev->node->full_name); 587 ofdev->dev.of_node->full_name);
588 err = -ENODEV; 588 err = -ENODEV;
589 goto fail; 589 goto fail;
590#endif 590#endif
591 } 591 }
592 592
593 mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0); 593 mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
594 mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1); 594 mal->rxeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 1);
595 mal->serr_irq = irq_of_parse_and_map(ofdev->node, 2); 595 mal->serr_irq = irq_of_parse_and_map(ofdev->dev.of_node, 2);
596 596
597 if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { 597 if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) {
598 mal->txde_irq = mal->rxde_irq = mal->serr_irq; 598 mal->txde_irq = mal->rxde_irq = mal->serr_irq;
599 } else { 599 } else {
600 mal->txde_irq = irq_of_parse_and_map(ofdev->node, 3); 600 mal->txde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 3);
601 mal->rxde_irq = irq_of_parse_and_map(ofdev->node, 4); 601 mal->rxde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 4);
602 } 602 }
603 603
604 if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ || 604 if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ ||
@@ -629,7 +629,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
629 /* Current Axon is not happy with priority being non-0, it can 629 /* Current Axon is not happy with priority being non-0, it can
630 * deadlock, fix it up here 630 * deadlock, fix it up here
631 */ 631 */
632 if (of_device_is_compatible(ofdev->node, "ibm,mcmal-axon")) 632 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-axon"))
633 cfg &= ~(MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10); 633 cfg &= ~(MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10);
634 634
635 /* Apply configuration */ 635 /* Apply configuration */
@@ -701,7 +701,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
701 701
702 printk(KERN_INFO 702 printk(KERN_INFO
703 "MAL v%d %s, %d TX channels, %d RX channels\n", 703 "MAL v%d %s, %d TX channels, %d RX channels\n",
704 mal->version, ofdev->node->full_name, 704 mal->version, ofdev->dev.of_node->full_name,
705 mal->num_tx_chans, mal->num_rx_chans); 705 mal->num_tx_chans, mal->num_rx_chans);
706 706
707 /* Advertise this instance to the rest of the world */ 707 /* Advertise this instance to the rest of the world */
@@ -790,9 +790,11 @@ static struct of_device_id mal_platform_match[] =
790}; 790};
791 791
792static struct of_platform_driver mal_of_driver = { 792static struct of_platform_driver mal_of_driver = {
793 .name = "mcmal", 793 .driver = {
794 .match_table = mal_platform_match, 794 .name = "mcmal",
795 795 .owner = THIS_MODULE,
796 .of_match_table = mal_platform_match,
797 },
796 .probe = mal_probe, 798 .probe = mal_probe,
797 .remove = mal_remove, 799 .remove = mal_remove,
798}; 800};
diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c
index 5b90d34c8455..108919bcdf13 100644
--- a/drivers/net/ibm_newemac/rgmii.c
+++ b/drivers/net/ibm_newemac/rgmii.c
@@ -103,7 +103,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode)
103 /* Check if we need to attach to a RGMII */ 103 /* Check if we need to attach to a RGMII */
104 if (input < 0 || !rgmii_valid_mode(mode)) { 104 if (input < 0 || !rgmii_valid_mode(mode)) {
105 printk(KERN_ERR "%s: unsupported settings !\n", 105 printk(KERN_ERR "%s: unsupported settings !\n",
106 ofdev->node->full_name); 106 ofdev->dev.of_node->full_name);
107 return -ENODEV; 107 return -ENODEV;
108 } 108 }
109 109
@@ -113,7 +113,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode)
113 out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input)); 113 out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input));
114 114
115 printk(KERN_NOTICE "%s: input %d in %s mode\n", 115 printk(KERN_NOTICE "%s: input %d in %s mode\n",
116 ofdev->node->full_name, input, rgmii_mode_name(mode)); 116 ofdev->dev.of_node->full_name, input, rgmii_mode_name(mode));
117 117
118 ++dev->users; 118 ++dev->users;
119 119
@@ -231,7 +231,7 @@ void *rgmii_dump_regs(struct of_device *ofdev, void *buf)
231static int __devinit rgmii_probe(struct of_device *ofdev, 231static int __devinit rgmii_probe(struct of_device *ofdev,
232 const struct of_device_id *match) 232 const struct of_device_id *match)
233{ 233{
234 struct device_node *np = ofdev->node; 234 struct device_node *np = ofdev->dev.of_node;
235 struct rgmii_instance *dev; 235 struct rgmii_instance *dev;
236 struct resource regs; 236 struct resource regs;
237 int rc; 237 int rc;
@@ -264,11 +264,11 @@ static int __devinit rgmii_probe(struct of_device *ofdev,
264 } 264 }
265 265
266 /* Check for RGMII flags */ 266 /* Check for RGMII flags */
267 if (of_get_property(ofdev->node, "has-mdio", NULL)) 267 if (of_get_property(ofdev->dev.of_node, "has-mdio", NULL))
268 dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; 268 dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO;
269 269
270 /* CAB lacks the right properties, fix this up */ 270 /* CAB lacks the right properties, fix this up */
271 if (of_device_is_compatible(ofdev->node, "ibm,rgmii-axon")) 271 if (of_device_is_compatible(ofdev->dev.of_node, "ibm,rgmii-axon"))
272 dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; 272 dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO;
273 273
274 DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n", 274 DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n",
@@ -279,7 +279,7 @@ static int __devinit rgmii_probe(struct of_device *ofdev,
279 279
280 printk(KERN_INFO 280 printk(KERN_INFO
281 "RGMII %s initialized with%s MDIO support\n", 281 "RGMII %s initialized with%s MDIO support\n",
282 ofdev->node->full_name, 282 ofdev->dev.of_node->full_name,
283 (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out"); 283 (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out");
284 284
285 wmb(); 285 wmb();
@@ -319,9 +319,11 @@ static struct of_device_id rgmii_match[] =
319}; 319};
320 320
321static struct of_platform_driver rgmii_driver = { 321static struct of_platform_driver rgmii_driver = {
322 .name = "emac-rgmii", 322 .driver = {
323 .match_table = rgmii_match, 323 .name = "emac-rgmii",
324 324 .owner = THIS_MODULE,
325 .of_match_table = rgmii_match,
326 },
325 .probe = rgmii_probe, 327 .probe = rgmii_probe,
326 .remove = rgmii_remove, 328 .remove = rgmii_remove,
327}; 329};
diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c
index 30173a9fb557..044637144c43 100644
--- a/drivers/net/ibm_newemac/tah.c
+++ b/drivers/net/ibm_newemac/tah.c
@@ -57,7 +57,8 @@ void tah_reset(struct of_device *ofdev)
57 --n; 57 --n;
58 58
59 if (unlikely(!n)) 59 if (unlikely(!n))
60 printk(KERN_ERR "%s: reset timeout\n", ofdev->node->full_name); 60 printk(KERN_ERR "%s: reset timeout\n",
61 ofdev->dev.of_node->full_name);
61 62
62 /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */ 63 /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */
63 out_be32(&p->mr, 64 out_be32(&p->mr,
@@ -89,7 +90,7 @@ void *tah_dump_regs(struct of_device *ofdev, void *buf)
89static int __devinit tah_probe(struct of_device *ofdev, 90static int __devinit tah_probe(struct of_device *ofdev,
90 const struct of_device_id *match) 91 const struct of_device_id *match)
91{ 92{
92 struct device_node *np = ofdev->node; 93 struct device_node *np = ofdev->dev.of_node;
93 struct tah_instance *dev; 94 struct tah_instance *dev;
94 struct resource regs; 95 struct resource regs;
95 int rc; 96 int rc;
@@ -127,7 +128,7 @@ static int __devinit tah_probe(struct of_device *ofdev,
127 tah_reset(ofdev); 128 tah_reset(ofdev);
128 129
129 printk(KERN_INFO 130 printk(KERN_INFO
130 "TAH %s initialized\n", ofdev->node->full_name); 131 "TAH %s initialized\n", ofdev->dev.of_node->full_name);
131 wmb(); 132 wmb();
132 133
133 return 0; 134 return 0;
@@ -165,9 +166,11 @@ static struct of_device_id tah_match[] =
165}; 166};
166 167
167static struct of_platform_driver tah_driver = { 168static struct of_platform_driver tah_driver = {
168 .name = "emac-tah", 169 .driver = {
169 .match_table = tah_match, 170 .name = "emac-tah",
170 171 .owner = THIS_MODULE,
172 .of_match_table = tah_match,
173 },
171 .probe = tah_probe, 174 .probe = tah_probe,
172 .remove = tah_remove, 175 .remove = tah_remove,
173}; 176};
diff --git a/drivers/net/ibm_newemac/zmii.c b/drivers/net/ibm_newemac/zmii.c
index 1f038f808ab3..046dcd069c45 100644
--- a/drivers/net/ibm_newemac/zmii.c
+++ b/drivers/net/ibm_newemac/zmii.c
@@ -121,13 +121,14 @@ int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode)
121 dev->mode = *mode; 121 dev->mode = *mode;
122 122
123 printk(KERN_NOTICE "%s: bridge in %s mode\n", 123 printk(KERN_NOTICE "%s: bridge in %s mode\n",
124 ofdev->node->full_name, zmii_mode_name(dev->mode)); 124 ofdev->dev.of_node->full_name,
125 zmii_mode_name(dev->mode));
125 } else { 126 } else {
126 /* All inputs must use the same mode */ 127 /* All inputs must use the same mode */
127 if (*mode != PHY_MODE_NA && *mode != dev->mode) { 128 if (*mode != PHY_MODE_NA && *mode != dev->mode) {
128 printk(KERN_ERR 129 printk(KERN_ERR
129 "%s: invalid mode %d specified for input %d\n", 130 "%s: invalid mode %d specified for input %d\n",
130 ofdev->node->full_name, *mode, input); 131 ofdev->dev.of_node->full_name, *mode, input);
131 mutex_unlock(&dev->lock); 132 mutex_unlock(&dev->lock);
132 return -EINVAL; 133 return -EINVAL;
133 } 134 }
@@ -233,7 +234,7 @@ void *zmii_dump_regs(struct of_device *ofdev, void *buf)
233static int __devinit zmii_probe(struct of_device *ofdev, 234static int __devinit zmii_probe(struct of_device *ofdev,
234 const struct of_device_id *match) 235 const struct of_device_id *match)
235{ 236{
236 struct device_node *np = ofdev->node; 237 struct device_node *np = ofdev->dev.of_node;
237 struct zmii_instance *dev; 238 struct zmii_instance *dev;
238 struct resource regs; 239 struct resource regs;
239 int rc; 240 int rc;
@@ -273,7 +274,7 @@ static int __devinit zmii_probe(struct of_device *ofdev,
273 out_be32(&dev->base->fer, 0); 274 out_be32(&dev->base->fer, 0);
274 275
275 printk(KERN_INFO 276 printk(KERN_INFO
276 "ZMII %s initialized\n", ofdev->node->full_name); 277 "ZMII %s initialized\n", ofdev->dev.of_node->full_name);
277 wmb(); 278 wmb();
278 dev_set_drvdata(&ofdev->dev, dev); 279 dev_set_drvdata(&ofdev->dev, dev);
279 280
@@ -312,9 +313,11 @@ static struct of_device_id zmii_match[] =
312}; 313};
313 314
314static struct of_platform_driver zmii_driver = { 315static struct of_platform_driver zmii_driver = {
315 .name = "emac-zmii", 316 .driver = {
316 .match_table = zmii_match, 317 .name = "emac-zmii",
317 318 .owner = THIS_MODULE,
319 .of_match_table = zmii_match,
320 },
318 .probe = zmii_probe, 321 .probe = zmii_probe,
319 .remove = zmii_remove, 322 .remove = zmii_remove,
320}; 323};
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index b59b24d667f0..fa7620e28404 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -920,14 +920,14 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
920 mutex_init(&lp->indirect_mutex); 920 mutex_init(&lp->indirect_mutex);
921 921
922 /* map device registers */ 922 /* map device registers */
923 lp->regs = of_iomap(op->node, 0); 923 lp->regs = of_iomap(op->dev.of_node, 0);
924 if (!lp->regs) { 924 if (!lp->regs) {
925 dev_err(&op->dev, "could not map temac regs.\n"); 925 dev_err(&op->dev, "could not map temac regs.\n");
926 goto nodev; 926 goto nodev;
927 } 927 }
928 928
929 /* Find the DMA node, map the DMA registers, and decode the DMA IRQs */ 929 /* Find the DMA node, map the DMA registers, and decode the DMA IRQs */
930 np = of_parse_phandle(op->node, "llink-connected", 0); 930 np = of_parse_phandle(op->dev.of_node, "llink-connected", 0);
931 if (!np) { 931 if (!np) {
932 dev_err(&op->dev, "could not find DMA node\n"); 932 dev_err(&op->dev, "could not find DMA node\n");
933 goto nodev; 933 goto nodev;
@@ -959,7 +959,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
959 of_node_put(np); /* Finished with the DMA node; drop the reference */ 959 of_node_put(np); /* Finished with the DMA node; drop the reference */
960 960
961 /* Retrieve the MAC address */ 961 /* Retrieve the MAC address */
962 addr = of_get_property(op->node, "local-mac-address", &size); 962 addr = of_get_property(op->dev.of_node, "local-mac-address", &size);
963 if ((!addr) || (size != 6)) { 963 if ((!addr) || (size != 6)) {
964 dev_err(&op->dev, "could not find MAC address\n"); 964 dev_err(&op->dev, "could not find MAC address\n");
965 rc = -ENODEV; 965 rc = -ENODEV;
@@ -967,11 +967,11 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
967 } 967 }
968 temac_set_mac_address(ndev, (void *)addr); 968 temac_set_mac_address(ndev, (void *)addr);
969 969
970 rc = temac_mdio_setup(lp, op->node); 970 rc = temac_mdio_setup(lp, op->dev.of_node);
971 if (rc) 971 if (rc)
972 dev_warn(&op->dev, "error registering MDIO bus\n"); 972 dev_warn(&op->dev, "error registering MDIO bus\n");
973 973
974 lp->phy_node = of_parse_phandle(op->node, "phy-handle", 0); 974 lp->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0);
975 if (lp->phy_node) 975 if (lp->phy_node)
976 dev_dbg(lp->dev, "using PHY node %s (%p)\n", np->full_name, np); 976 dev_dbg(lp->dev, "using PHY node %s (%p)\n", np->full_name, np);
977 977
@@ -1024,12 +1024,12 @@ static struct of_device_id temac_of_match[] __devinitdata = {
1024MODULE_DEVICE_TABLE(of, temac_of_match); 1024MODULE_DEVICE_TABLE(of, temac_of_match);
1025 1025
1026static struct of_platform_driver temac_of_driver = { 1026static struct of_platform_driver temac_of_driver = {
1027 .match_table = temac_of_match,
1028 .probe = temac_of_probe, 1027 .probe = temac_of_probe,
1029 .remove = __devexit_p(temac_of_remove), 1028 .remove = __devexit_p(temac_of_remove),
1030 .driver = { 1029 .driver = {
1031 .owner = THIS_MODULE, 1030 .owner = THIS_MODULE,
1032 .name = "xilinx_temac", 1031 .name = "xilinx_temac",
1032 .of_match_table = temac_of_match,
1033 }, 1033 },
1034}; 1034};
1035 1035
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index 3898108f98ce..1a57c3da1f49 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -928,7 +928,7 @@ static const struct net_device_ops myri_ops = {
928 928
929static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match) 929static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match)
930{ 930{
931 struct device_node *dp = op->node; 931 struct device_node *dp = op->dev.of_node;
932 static unsigned version_printed; 932 static unsigned version_printed;
933 struct net_device *dev; 933 struct net_device *dev;
934 struct myri_eth *mp; 934 struct myri_eth *mp;
@@ -1161,8 +1161,11 @@ static const struct of_device_id myri_sbus_match[] = {
1161MODULE_DEVICE_TABLE(of, myri_sbus_match); 1161MODULE_DEVICE_TABLE(of, myri_sbus_match);
1162 1162
1163static struct of_platform_driver myri_sbus_driver = { 1163static struct of_platform_driver myri_sbus_driver = {
1164 .name = "myri", 1164 .driver = {
1165 .match_table = myri_sbus_match, 1165 .name = "myri",
1166 .owner = THIS_MODULE,
1167 .of_match_table = myri_sbus_match,
1168 },
1166 .probe = myri_sbus_probe, 1169 .probe = myri_sbus_probe,
1167 .remove = __devexit_p(myri_sbus_remove), 1170 .remove = __devexit_p(myri_sbus_remove),
1168}; 1171};
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 30abb4e436f1..63e8e3893bd6 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -9115,7 +9115,7 @@ static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map)
9115 const u32 *int_prop; 9115 const u32 *int_prop;
9116 int i; 9116 int i;
9117 9117
9118 int_prop = of_get_property(op->node, "interrupts", NULL); 9118 int_prop = of_get_property(op->dev.of_node, "interrupts", NULL);
9119 if (!int_prop) 9119 if (!int_prop)
9120 return -ENODEV; 9120 return -ENODEV;
9121 9121
@@ -9266,7 +9266,7 @@ static int __devinit niu_get_of_props(struct niu *np)
9266 int prop_len; 9266 int prop_len;
9267 9267
9268 if (np->parent->plat_type == PLAT_TYPE_NIU) 9268 if (np->parent->plat_type == PLAT_TYPE_NIU)
9269 dp = np->op->node; 9269 dp = np->op->dev.of_node;
9270 else 9270 else
9271 dp = pci_device_to_OF_node(np->pdev); 9271 dp = pci_device_to_OF_node(np->pdev);
9272 9272
@@ -10083,10 +10083,10 @@ static int __devinit niu_of_probe(struct of_device *op,
10083 10083
10084 niu_driver_version(); 10084 niu_driver_version();
10085 10085
10086 reg = of_get_property(op->node, "reg", NULL); 10086 reg = of_get_property(op->dev.of_node, "reg", NULL);
10087 if (!reg) { 10087 if (!reg) {
10088 dev_err(&op->dev, "%s: No 'reg' property, aborting\n", 10088 dev_err(&op->dev, "%s: No 'reg' property, aborting\n",
10089 op->node->full_name); 10089 op->dev.of_node->full_name);
10090 return -ENODEV; 10090 return -ENODEV;
10091 } 10091 }
10092 10092
@@ -10099,7 +10099,7 @@ static int __devinit niu_of_probe(struct of_device *op,
10099 np = netdev_priv(dev); 10099 np = netdev_priv(dev);
10100 10100
10101 memset(&parent_id, 0, sizeof(parent_id)); 10101 memset(&parent_id, 0, sizeof(parent_id));
10102 parent_id.of = of_get_parent(op->node); 10102 parent_id.of = of_get_parent(op->dev.of_node);
10103 10103
10104 np->parent = niu_get_parent(np, &parent_id, 10104 np->parent = niu_get_parent(np, &parent_id,
10105 PLAT_TYPE_NIU); 10105 PLAT_TYPE_NIU);
@@ -10234,8 +10234,11 @@ static const struct of_device_id niu_match[] = {
10234MODULE_DEVICE_TABLE(of, niu_match); 10234MODULE_DEVICE_TABLE(of, niu_match);
10235 10235
10236static struct of_platform_driver niu_of_driver = { 10236static struct of_platform_driver niu_of_driver = {
10237 .name = "niu", 10237 .driver = {
10238 .match_table = niu_match, 10238 .name = "niu",
10239 .owner = THIS_MODULE,
10240 .of_match_table = niu_match,
10241 },
10239 .probe = niu_of_probe, 10242 .probe = niu_of_probe,
10240 .remove = __devexit_p(niu_of_remove), 10243 .remove = __devexit_p(niu_of_remove),
10241}; 10244};
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 35897134a5dd..fc5fef2a8175 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -199,12 +199,12 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
199 if (!pdata) 199 if (!pdata)
200 return -ENOMEM; 200 return -ENOMEM;
201 201
202 ret = of_get_gpio(ofdev->node, 0); 202 ret = of_get_gpio(ofdev->dev.of_node, 0);
203 if (ret < 0) 203 if (ret < 0)
204 goto out_free; 204 goto out_free;
205 pdata->mdc = ret; 205 pdata->mdc = ret;
206 206
207 ret = of_get_gpio(ofdev->node, 1); 207 ret = of_get_gpio(ofdev->dev.of_node, 1);
208 if (ret < 0) 208 if (ret < 0)
209 goto out_free; 209 goto out_free;
210 pdata->mdio = ret; 210 pdata->mdio = ret;
@@ -213,7 +213,7 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
213 if (!new_bus) 213 if (!new_bus)
214 goto out_free; 214 goto out_free;
215 215
216 ret = of_mdiobus_register(new_bus, ofdev->node); 216 ret = of_mdiobus_register(new_bus, ofdev->dev.of_node);
217 if (ret) 217 if (ret)
218 mdio_gpio_bus_deinit(&ofdev->dev); 218 mdio_gpio_bus_deinit(&ofdev->dev);
219 219
@@ -241,8 +241,11 @@ static struct of_device_id mdio_ofgpio_match[] = {
241MODULE_DEVICE_TABLE(of, mdio_ofgpio_match); 241MODULE_DEVICE_TABLE(of, mdio_ofgpio_match);
242 242
243static struct of_platform_driver mdio_ofgpio_driver = { 243static struct of_platform_driver mdio_ofgpio_driver = {
244 .name = "mdio-gpio", 244 .driver = {
245 .match_table = mdio_ofgpio_match, 245 .name = "mdio-gpio",
246 .owner = THIS_MODULE,
247 .of_match_table = mdio_ofgpio_match,
248 },
246 .probe = mdio_ofgpio_probe, 249 .probe = mdio_ofgpio_probe,
247 .remove = __devexit_p(mdio_ofgpio_remove), 250 .remove = __devexit_p(mdio_ofgpio_remove),
248}; 251};
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c
index 4591fe9bf0b9..367e96f317d4 100644
--- a/drivers/net/sunbmac.c
+++ b/drivers/net/sunbmac.c
@@ -1131,8 +1131,8 @@ static int __devinit bigmac_ether_init(struct of_device *op,
1131 goto fail_and_cleanup; 1131 goto fail_and_cleanup;
1132 1132
1133 /* Get supported SBUS burst sizes. */ 1133 /* Get supported SBUS burst sizes. */
1134 bsizes = of_getintprop_default(qec_op->node, "burst-sizes", 0xff); 1134 bsizes = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff);
1135 bsizes_more = of_getintprop_default(qec_op->node, "burst-sizes", 0xff); 1135 bsizes_more = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff);
1136 1136
1137 bsizes &= 0xff; 1137 bsizes &= 0xff;
1138 if (bsizes_more != 0xff) 1138 if (bsizes_more != 0xff)
@@ -1184,7 +1184,7 @@ static int __devinit bigmac_ether_init(struct of_device *op,
1184 } 1184 }
1185 1185
1186 /* Get the board revision of this BigMAC. */ 1186 /* Get the board revision of this BigMAC. */
1187 bp->board_rev = of_getintprop_default(bp->bigmac_op->node, 1187 bp->board_rev = of_getintprop_default(bp->bigmac_op->dev.of_node,
1188 "board-version", 1); 1188 "board-version", 1);
1189 1189
1190 /* Init auto-negotiation timer state. */ 1190 /* Init auto-negotiation timer state. */
@@ -1290,8 +1290,11 @@ static const struct of_device_id bigmac_sbus_match[] = {
1290MODULE_DEVICE_TABLE(of, bigmac_sbus_match); 1290MODULE_DEVICE_TABLE(of, bigmac_sbus_match);
1291 1291
1292static struct of_platform_driver bigmac_sbus_driver = { 1292static struct of_platform_driver bigmac_sbus_driver = {
1293 .name = "sunbmac", 1293 .driver = {
1294 .match_table = bigmac_sbus_match, 1294 .name = "sunbmac",
1295 .owner = THIS_MODULE,
1296 .of_match_table = bigmac_sbus_match,
1297 },
1295 .probe = bigmac_sbus_probe, 1298 .probe = bigmac_sbus_probe,
1296 .remove = __devexit_p(bigmac_sbus_remove), 1299 .remove = __devexit_p(bigmac_sbus_remove),
1297}; 1300};
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 915c5909c7a8..3d9650b8d38f 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -2481,7 +2481,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info
2481 else { 2481 else {
2482 const struct linux_prom_registers *regs; 2482 const struct linux_prom_registers *regs;
2483 struct of_device *op = hp->happy_dev; 2483 struct of_device *op = hp->happy_dev;
2484 regs = of_get_property(op->node, "regs", NULL); 2484 regs = of_get_property(op->dev.of_node, "regs", NULL);
2485 if (regs) 2485 if (regs)
2486 sprintf(info->bus_info, "SBUS:%d", 2486 sprintf(info->bus_info, "SBUS:%d",
2487 regs->which_io); 2487 regs->which_io);
@@ -2641,14 +2641,14 @@ static const struct net_device_ops hme_netdev_ops = {
2641#ifdef CONFIG_SBUS 2641#ifdef CONFIG_SBUS
2642static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) 2642static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe)
2643{ 2643{
2644 struct device_node *dp = op->node, *sbus_dp; 2644 struct device_node *dp = op->dev.of_node, *sbus_dp;
2645 struct quattro *qp = NULL; 2645 struct quattro *qp = NULL;
2646 struct happy_meal *hp; 2646 struct happy_meal *hp;
2647 struct net_device *dev; 2647 struct net_device *dev;
2648 int i, qfe_slot = -1; 2648 int i, qfe_slot = -1;
2649 int err = -ENODEV; 2649 int err = -ENODEV;
2650 2650
2651 sbus_dp = to_of_device(op->dev.parent)->node; 2651 sbus_dp = to_of_device(op->dev.parent)->dev.of_node;
2652 2652
2653 /* We can match PCI devices too, do not accept those here. */ 2653 /* We can match PCI devices too, do not accept those here. */
2654 if (strcmp(sbus_dp->name, "sbus")) 2654 if (strcmp(sbus_dp->name, "sbus"))
@@ -3237,7 +3237,7 @@ static void happy_meal_pci_exit(void)
3237#ifdef CONFIG_SBUS 3237#ifdef CONFIG_SBUS
3238static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) 3238static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match)
3239{ 3239{
3240 struct device_node *dp = op->node; 3240 struct device_node *dp = op->dev.of_node;
3241 const char *model = of_get_property(dp, "model", NULL); 3241 const char *model = of_get_property(dp, "model", NULL);
3242 int is_qfe = (match->data != NULL); 3242 int is_qfe = (match->data != NULL);
3243 3243
@@ -3291,8 +3291,11 @@ static const struct of_device_id hme_sbus_match[] = {
3291MODULE_DEVICE_TABLE(of, hme_sbus_match); 3291MODULE_DEVICE_TABLE(of, hme_sbus_match);
3292 3292
3293static struct of_platform_driver hme_sbus_driver = { 3293static struct of_platform_driver hme_sbus_driver = {
3294 .name = "hme", 3294 .driver = {
3295 .match_table = hme_sbus_match, 3295 .name = "hme",
3296 .owner = THIS_MODULE,
3297 .of_match_table = hme_sbus_match,
3298 },
3296 .probe = hme_sbus_probe, 3299 .probe = hme_sbus_probe,
3297 .remove = __devexit_p(hme_sbus_remove), 3300 .remove = __devexit_p(hme_sbus_remove),
3298}; 3301};
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 386af7bbe678..7d9c33dd9d1a 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -1323,7 +1323,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op,
1323 struct of_device *ledma, 1323 struct of_device *ledma,
1324 struct of_device *lebuffer) 1324 struct of_device *lebuffer)
1325{ 1325{
1326 struct device_node *dp = op->node; 1326 struct device_node *dp = op->dev.of_node;
1327 static unsigned version_printed; 1327 static unsigned version_printed;
1328 struct lance_private *lp; 1328 struct lance_private *lp;
1329 struct net_device *dev; 1329 struct net_device *dev;
@@ -1410,7 +1410,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op,
1410 1410
1411 lp->burst_sizes = 0; 1411 lp->burst_sizes = 0;
1412 if (lp->ledma) { 1412 if (lp->ledma) {
1413 struct device_node *ledma_dp = ledma->node; 1413 struct device_node *ledma_dp = ledma->dev.of_node;
1414 struct device_node *sbus_dp; 1414 struct device_node *sbus_dp;
1415 unsigned int sbmask; 1415 unsigned int sbmask;
1416 const char *prop; 1416 const char *prop;
@@ -1506,7 +1506,7 @@ fail:
1506static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) 1506static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match)
1507{ 1507{
1508 struct of_device *parent = to_of_device(op->dev.parent); 1508 struct of_device *parent = to_of_device(op->dev.parent);
1509 struct device_node *parent_dp = parent->node; 1509 struct device_node *parent_dp = parent->dev.of_node;
1510 int err; 1510 int err;
1511 1511
1512 if (!strcmp(parent_dp->name, "ledma")) { 1512 if (!strcmp(parent_dp->name, "ledma")) {
@@ -1545,8 +1545,11 @@ static const struct of_device_id sunlance_sbus_match[] = {
1545MODULE_DEVICE_TABLE(of, sunlance_sbus_match); 1545MODULE_DEVICE_TABLE(of, sunlance_sbus_match);
1546 1546
1547static struct of_platform_driver sunlance_sbus_driver = { 1547static struct of_platform_driver sunlance_sbus_driver = {
1548 .name = "sunlance", 1548 .driver = {
1549 .match_table = sunlance_sbus_match, 1549 .name = "sunlance",
1550 .owner = THIS_MODULE,
1551 .of_match_table = sunlance_sbus_match,
1552 },
1550 .probe = sunlance_sbus_probe, 1553 .probe = sunlance_sbus_probe,
1551 .remove = __devexit_p(sunlance_sbus_remove), 1554 .remove = __devexit_p(sunlance_sbus_remove),
1552}; 1555};
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index a7542d25c845..72b579c8d812 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -695,7 +695,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
695 strcpy(info->version, "3.0"); 695 strcpy(info->version, "3.0");
696 696
697 op = qep->op; 697 op = qep->op;
698 regs = of_get_property(op->node, "reg", NULL); 698 regs = of_get_property(op->dev.of_node, "reg", NULL);
699 if (regs) 699 if (regs)
700 sprintf(info->bus_info, "SBUS:%d", regs->which_io); 700 sprintf(info->bus_info, "SBUS:%d", regs->which_io);
701 701
@@ -799,7 +799,7 @@ static struct sunqec * __devinit get_qec(struct of_device *child)
799 if (qec_global_reset(qecp->gregs)) 799 if (qec_global_reset(qecp->gregs))
800 goto fail; 800 goto fail;
801 801
802 qecp->qec_bursts = qec_get_burst(op->node); 802 qecp->qec_bursts = qec_get_burst(op->dev.of_node);
803 803
804 qec_init_once(qecp, op); 804 qec_init_once(qecp, op);
805 805
@@ -857,7 +857,7 @@ static int __devinit qec_ether_init(struct of_device *op)
857 857
858 res = -ENODEV; 858 res = -ENODEV;
859 859
860 i = of_getintprop_default(op->node, "channel#", -1); 860 i = of_getintprop_default(op->dev.of_node, "channel#", -1);
861 if (i == -1) 861 if (i == -1)
862 goto fail; 862 goto fail;
863 qe->channel = i; 863 qe->channel = i;
@@ -977,8 +977,11 @@ static const struct of_device_id qec_sbus_match[] = {
977MODULE_DEVICE_TABLE(of, qec_sbus_match); 977MODULE_DEVICE_TABLE(of, qec_sbus_match);
978 978
979static struct of_platform_driver qec_sbus_driver = { 979static struct of_platform_driver qec_sbus_driver = {
980 .name = "qec", 980 .driver = {
981 .match_table = qec_sbus_match, 981 .name = "qec",
982 .owner = THIS_MODULE,
983 .of_match_table = qec_sbus_match,
984 },
982 .probe = qec_sbus_probe, 985 .probe = qec_sbus_probe,
983 .remove = __devexit_p(qec_sbus_remove), 986 .remove = __devexit_p(qec_sbus_remove),
984}; 987};
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 932602db54b3..4a34833b85dd 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3719,7 +3719,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = {
3719static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) 3719static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match)
3720{ 3720{
3721 struct device *device = &ofdev->dev; 3721 struct device *device = &ofdev->dev;
3722 struct device_node *np = ofdev->node; 3722 struct device_node *np = ofdev->dev.of_node;
3723 struct net_device *dev = NULL; 3723 struct net_device *dev = NULL;
3724 struct ucc_geth_private *ugeth = NULL; 3724 struct ucc_geth_private *ugeth = NULL;
3725 struct ucc_geth_info *ug_info; 3725 struct ucc_geth_info *ug_info;
@@ -3963,8 +3963,11 @@ static struct of_device_id ucc_geth_match[] = {
3963MODULE_DEVICE_TABLE(of, ucc_geth_match); 3963MODULE_DEVICE_TABLE(of, ucc_geth_match);
3964 3964
3965static struct of_platform_driver ucc_geth_driver = { 3965static struct of_platform_driver ucc_geth_driver = {
3966 .name = DRV_NAME, 3966 .driver = {
3967 .match_table = ucc_geth_match, 3967 .name = DRV_NAME,
3968 .owner = THIS_MODULE,
3969 .of_match_table = ucc_geth_match,
3970 },
3968 .probe = ucc_geth_probe, 3971 .probe = ucc_geth_probe,
3969 .remove = ucc_geth_remove, 3972 .remove = ucc_geth_remove,
3970 .suspend = ucc_geth_suspend, 3973 .suspend = ucc_geth_suspend,
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index a7db68d37ee9..d04c5b262050 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -1088,7 +1088,7 @@ static void xemaclite_remove_ndev(struct net_device *ndev)
1088 */ 1088 */
1089static bool get_bool(struct of_device *ofdev, const char *s) 1089static bool get_bool(struct of_device *ofdev, const char *s)
1090{ 1090{
1091 u32 *p = (u32 *)of_get_property(ofdev->node, s, NULL); 1091 u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL);
1092 1092
1093 if (p) { 1093 if (p) {
1094 return (bool)*p; 1094 return (bool)*p;
@@ -1130,14 +1130,14 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev,
1130 dev_info(dev, "Device Tree Probing\n"); 1130 dev_info(dev, "Device Tree Probing\n");
1131 1131
1132 /* Get iospace for the device */ 1132 /* Get iospace for the device */
1133 rc = of_address_to_resource(ofdev->node, 0, &r_mem); 1133 rc = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem);
1134 if (rc) { 1134 if (rc) {
1135 dev_err(dev, "invalid address\n"); 1135 dev_err(dev, "invalid address\n");
1136 return rc; 1136 return rc;
1137 } 1137 }
1138 1138
1139 /* Get IRQ for the device */ 1139 /* Get IRQ for the device */
1140 rc = of_irq_to_resource(ofdev->node, 0, &r_irq); 1140 rc = of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq);
1141 if (rc == NO_IRQ) { 1141 if (rc == NO_IRQ) {
1142 dev_err(dev, "no IRQ found\n"); 1142 dev_err(dev, "no IRQ found\n");
1143 return rc; 1143 return rc;
@@ -1182,7 +1182,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev,
1182 lp->next_rx_buf_to_use = 0x0; 1182 lp->next_rx_buf_to_use = 0x0;
1183 lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong"); 1183 lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong");
1184 lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong"); 1184 lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong");
1185 mac_address = of_get_mac_address(ofdev->node); 1185 mac_address = of_get_mac_address(ofdev->dev.of_node);
1186 1186
1187 if (mac_address) 1187 if (mac_address)
1188 /* Set the MAC address. */ 1188 /* Set the MAC address. */
@@ -1197,7 +1197,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev,
1197 /* Set the MAC address in the EmacLite device */ 1197 /* Set the MAC address in the EmacLite device */
1198 xemaclite_update_address(lp, ndev->dev_addr); 1198 xemaclite_update_address(lp, ndev->dev_addr);
1199 1199
1200 lp->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0); 1200 lp->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0);
1201 rc = xemaclite_mdio_setup(lp, &ofdev->dev); 1201 rc = xemaclite_mdio_setup(lp, &ofdev->dev);
1202 if (rc) 1202 if (rc)
1203 dev_warn(&ofdev->dev, "error registering MDIO bus\n"); 1203 dev_warn(&ofdev->dev, "error registering MDIO bus\n");
@@ -1291,8 +1291,11 @@ static struct of_device_id xemaclite_of_match[] __devinitdata = {
1291MODULE_DEVICE_TABLE(of, xemaclite_of_match); 1291MODULE_DEVICE_TABLE(of, xemaclite_of_match);
1292 1292
1293static struct of_platform_driver xemaclite_of_driver = { 1293static struct of_platform_driver xemaclite_of_driver = {
1294 .name = DRIVER_NAME, 1294 .driver = {
1295 .match_table = xemaclite_of_match, 1295 .name = DRIVER_NAME,
1296 .owner = THIS_MODULE,
1297 .of_match_table = xemaclite_of_match,
1298 },
1296 .probe = xemaclite_of_probe, 1299 .probe = xemaclite_of_probe,
1297 .remove = __devexit_p(xemaclite_of_remove), 1300 .remove = __devexit_p(xemaclite_of_remove),
1298}; 1301};