diff options
Diffstat (limited to 'drivers/net')
41 files changed, 168 insertions, 168 deletions
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index af753936e835..b1bdc909090f 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c | |||
| @@ -38,7 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | struct mpc5xxx_can_data { | 39 | struct mpc5xxx_can_data { |
| 40 | unsigned int type; | 40 | unsigned int type; |
| 41 | u32 (*get_clock)(struct of_device *ofdev, const char *clock_name, | 41 | u32 (*get_clock)(struct platform_device *ofdev, const char *clock_name, |
| 42 | int *mscan_clksrc); | 42 | int *mscan_clksrc); |
| 43 | }; | 43 | }; |
| 44 | 44 | ||
| @@ -48,7 +48,7 @@ static struct of_device_id __devinitdata mpc52xx_cdm_ids[] = { | |||
| 48 | {} | 48 | {} |
| 49 | }; | 49 | }; |
| 50 | 50 | ||
| 51 | static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, | 51 | static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev, |
| 52 | const char *clock_name, | 52 | const char *clock_name, |
| 53 | int *mscan_clksrc) | 53 | int *mscan_clksrc) |
| 54 | { | 54 | { |
| @@ -101,7 +101,7 @@ static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, | |||
| 101 | return freq; | 101 | return freq; |
| 102 | } | 102 | } |
| 103 | #else /* !CONFIG_PPC_MPC52xx */ | 103 | #else /* !CONFIG_PPC_MPC52xx */ |
| 104 | static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, | 104 | static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev, |
| 105 | const char *clock_name, | 105 | const char *clock_name, |
| 106 | int *mscan_clksrc) | 106 | int *mscan_clksrc) |
| 107 | { | 107 | { |
| @@ -129,7 +129,7 @@ static struct of_device_id __devinitdata mpc512x_clock_ids[] = { | |||
| 129 | {} | 129 | {} |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, | 132 | static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, |
| 133 | const char *clock_name, | 133 | const char *clock_name, |
| 134 | int *mscan_clksrc) | 134 | int *mscan_clksrc) |
| 135 | { | 135 | { |
| @@ -239,7 +239,7 @@ exit_unmap: | |||
| 239 | return freq; | 239 | return freq; |
| 240 | } | 240 | } |
| 241 | #else /* !CONFIG_PPC_MPC512x */ | 241 | #else /* !CONFIG_PPC_MPC512x */ |
| 242 | static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, | 242 | static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, |
| 243 | const char *clock_name, | 243 | const char *clock_name, |
| 244 | int *mscan_clksrc) | 244 | int *mscan_clksrc) |
| 245 | { | 245 | { |
| @@ -247,7 +247,7 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, | |||
| 247 | } | 247 | } |
| 248 | #endif /* CONFIG_PPC_MPC512x */ | 248 | #endif /* CONFIG_PPC_MPC512x */ |
| 249 | 249 | ||
| 250 | static int __devinit mpc5xxx_can_probe(struct of_device *ofdev, | 250 | static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev, |
| 251 | const struct of_device_id *id) | 251 | const struct of_device_id *id) |
| 252 | { | 252 | { |
| 253 | struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; | 253 | struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; |
| @@ -317,7 +317,7 @@ exit_unmap_mem: | |||
| 317 | return err; | 317 | return err; |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | static int __devexit mpc5xxx_can_remove(struct of_device *ofdev) | 320 | static int __devexit mpc5xxx_can_remove(struct platform_device *ofdev) |
| 321 | { | 321 | { |
| 322 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 322 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
| 323 | struct mscan_priv *priv = netdev_priv(dev); | 323 | struct mscan_priv *priv = netdev_priv(dev); |
| @@ -334,7 +334,7 @@ static int __devexit mpc5xxx_can_remove(struct of_device *ofdev) | |||
| 334 | 334 | ||
| 335 | #ifdef CONFIG_PM | 335 | #ifdef CONFIG_PM |
| 336 | static struct mscan_regs saved_regs; | 336 | static struct mscan_regs saved_regs; |
| 337 | static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state) | 337 | static int mpc5xxx_can_suspend(struct platform_device *ofdev, pm_message_t state) |
| 338 | { | 338 | { |
| 339 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 339 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
| 340 | struct mscan_priv *priv = netdev_priv(dev); | 340 | struct mscan_priv *priv = netdev_priv(dev); |
| @@ -345,7 +345,7 @@ static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state) | |||
| 345 | return 0; | 345 | return 0; |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | static int mpc5xxx_can_resume(struct of_device *ofdev) | 348 | static int mpc5xxx_can_resume(struct platform_device *ofdev) |
| 349 | { | 349 | { |
| 350 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 350 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
| 351 | struct mscan_priv *priv = netdev_priv(dev); | 351 | struct mscan_priv *priv = netdev_priv(dev); |
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index ac1a83d7c204..5bfccfdf3bbb 100644 --- a/drivers/net/can/sja1000/sja1000_of_platform.c +++ b/drivers/net/can/sja1000/sja1000_of_platform.c | |||
| @@ -67,7 +67,7 @@ static void sja1000_ofp_write_reg(const struct sja1000_priv *priv, | |||
| 67 | out_8(priv->reg_base + reg, val); | 67 | out_8(priv->reg_base + reg, val); |
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | 70 | static int __devexit sja1000_ofp_remove(struct platform_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); |
| @@ -87,7 +87,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | |||
| 87 | return 0; | 87 | return 0; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | static int __devinit sja1000_ofp_probe(struct of_device *ofdev, | 90 | static int __devinit sja1000_ofp_probe(struct platform_device *ofdev, |
| 91 | const struct of_device_id *id) | 91 | const struct of_device_id *id) |
| 92 | { | 92 | { |
| 93 | struct device_node *np = ofdev->dev.of_node; | 93 | struct device_node *np = ofdev->dev.of_node; |
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 0060e422f171..99a929964e3c 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
| @@ -413,7 +413,7 @@ struct ehea_port_res { | |||
| 413 | 413 | ||
| 414 | struct ehea_adapter { | 414 | struct ehea_adapter { |
| 415 | u64 handle; | 415 | u64 handle; |
| 416 | struct of_device *ofdev; | 416 | struct platform_device *ofdev; |
| 417 | struct ehea_port *port[EHEA_MAX_PORTS]; | 417 | struct ehea_port *port[EHEA_MAX_PORTS]; |
| 418 | struct ehea_eq *neq; /* notification event queue */ | 418 | struct ehea_eq *neq; /* notification event queue */ |
| 419 | struct tasklet_struct neq_tasklet; | 419 | struct tasklet_struct neq_tasklet; |
| @@ -465,7 +465,7 @@ struct ehea_port { | |||
| 465 | struct net_device *netdev; | 465 | struct net_device *netdev; |
| 466 | struct net_device_stats stats; | 466 | struct net_device_stats stats; |
| 467 | struct ehea_port_res port_res[EHEA_MAX_PORT_RES]; | 467 | struct ehea_port_res port_res[EHEA_MAX_PORT_RES]; |
| 468 | struct of_device ofdev; /* Open Firmware Device */ | 468 | struct platform_device ofdev; /* Open Firmware Device */ |
| 469 | struct ehea_mc_list *mc_list; /* Multicast MAC addresses */ | 469 | struct ehea_mc_list *mc_list; /* Multicast MAC addresses */ |
| 470 | struct vlan_group *vgrp; | 470 | struct vlan_group *vgrp; |
| 471 | struct ehea_eq *qp_eq; | 471 | struct ehea_eq *qp_eq; |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 3beba70b7dea..897719b49f96 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
| @@ -107,10 +107,10 @@ struct ehea_fw_handle_array ehea_fw_handles; | |||
| 107 | struct ehea_bcmc_reg_array ehea_bcmc_regs; | 107 | struct ehea_bcmc_reg_array ehea_bcmc_regs; |
| 108 | 108 | ||
| 109 | 109 | ||
| 110 | static int __devinit ehea_probe_adapter(struct of_device *dev, | 110 | static int __devinit ehea_probe_adapter(struct platform_device *dev, |
| 111 | const struct of_device_id *id); | 111 | const struct of_device_id *id); |
| 112 | 112 | ||
| 113 | static int __devexit ehea_remove(struct of_device *dev); | 113 | static int __devexit ehea_remove(struct platform_device *dev); |
| 114 | 114 | ||
| 115 | static struct of_device_id ehea_device_table[] = { | 115 | static struct of_device_id ehea_device_table[] = { |
| 116 | { | 116 | { |
| @@ -3376,7 +3376,7 @@ static ssize_t ehea_remove_port(struct device *dev, | |||
| 3376 | static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); | 3376 | static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); |
| 3377 | static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); | 3377 | static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); |
| 3378 | 3378 | ||
| 3379 | int ehea_create_device_sysfs(struct of_device *dev) | 3379 | int ehea_create_device_sysfs(struct platform_device *dev) |
| 3380 | { | 3380 | { |
| 3381 | int ret = device_create_file(&dev->dev, &dev_attr_probe_port); | 3381 | int ret = device_create_file(&dev->dev, &dev_attr_probe_port); |
| 3382 | if (ret) | 3382 | if (ret) |
| @@ -3387,13 +3387,13 @@ out: | |||
| 3387 | return ret; | 3387 | return ret; |
| 3388 | } | 3388 | } |
| 3389 | 3389 | ||
| 3390 | void ehea_remove_device_sysfs(struct of_device *dev) | 3390 | void ehea_remove_device_sysfs(struct platform_device *dev) |
| 3391 | { | 3391 | { |
| 3392 | device_remove_file(&dev->dev, &dev_attr_probe_port); | 3392 | device_remove_file(&dev->dev, &dev_attr_probe_port); |
| 3393 | device_remove_file(&dev->dev, &dev_attr_remove_port); | 3393 | device_remove_file(&dev->dev, &dev_attr_remove_port); |
| 3394 | } | 3394 | } |
| 3395 | 3395 | ||
| 3396 | static int __devinit ehea_probe_adapter(struct of_device *dev, | 3396 | static int __devinit ehea_probe_adapter(struct platform_device *dev, |
| 3397 | const struct of_device_id *id) | 3397 | const struct of_device_id *id) |
| 3398 | { | 3398 | { |
| 3399 | struct ehea_adapter *adapter; | 3399 | struct ehea_adapter *adapter; |
| @@ -3492,7 +3492,7 @@ out: | |||
| 3492 | return ret; | 3492 | return ret; |
| 3493 | } | 3493 | } |
| 3494 | 3494 | ||
| 3495 | static int __devexit ehea_remove(struct of_device *dev) | 3495 | static int __devexit ehea_remove(struct platform_device *dev) |
| 3496 | { | 3496 | { |
| 3497 | struct ehea_adapter *adapter = dev_get_drvdata(&dev->dev); | 3497 | struct ehea_adapter *adapter = dev_get_drvdata(&dev->dev); |
| 3498 | int i; | 3498 | int i; |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index d1a5b17b2a95..e3e10b4add9c 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
| @@ -850,7 +850,7 @@ static const struct net_device_ops mpc52xx_fec_netdev_ops = { | |||
| 850 | /* ======================================================================== */ | 850 | /* ======================================================================== */ |
| 851 | 851 | ||
| 852 | static int __devinit | 852 | static int __devinit |
| 853 | mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | 853 | mpc52xx_fec_probe(struct platform_device *op, const struct of_device_id *match) |
| 854 | { | 854 | { |
| 855 | int rv; | 855 | int rv; |
| 856 | struct net_device *ndev; | 856 | struct net_device *ndev; |
| @@ -995,7 +995,7 @@ err_netdev: | |||
| 995 | } | 995 | } |
| 996 | 996 | ||
| 997 | static int | 997 | static int |
| 998 | mpc52xx_fec_remove(struct of_device *op) | 998 | mpc52xx_fec_remove(struct platform_device *op) |
| 999 | { | 999 | { |
| 1000 | struct net_device *ndev; | 1000 | struct net_device *ndev; |
| 1001 | struct mpc52xx_fec_priv *priv; | 1001 | struct mpc52xx_fec_priv *priv; |
| @@ -1025,7 +1025,7 @@ mpc52xx_fec_remove(struct of_device *op) | |||
| 1025 | } | 1025 | } |
| 1026 | 1026 | ||
| 1027 | #ifdef CONFIG_PM | 1027 | #ifdef CONFIG_PM |
| 1028 | static int mpc52xx_fec_of_suspend(struct of_device *op, pm_message_t state) | 1028 | static int mpc52xx_fec_of_suspend(struct platform_device *op, pm_message_t state) |
| 1029 | { | 1029 | { |
| 1030 | struct net_device *dev = dev_get_drvdata(&op->dev); | 1030 | struct net_device *dev = dev_get_drvdata(&op->dev); |
| 1031 | 1031 | ||
| @@ -1035,7 +1035,7 @@ static int mpc52xx_fec_of_suspend(struct of_device *op, pm_message_t state) | |||
| 1035 | return 0; | 1035 | return 0; |
| 1036 | } | 1036 | } |
| 1037 | 1037 | ||
| 1038 | static int mpc52xx_fec_of_resume(struct of_device *op) | 1038 | static int mpc52xx_fec_of_resume(struct platform_device *op) |
| 1039 | { | 1039 | { |
| 1040 | struct net_device *dev = dev_get_drvdata(&op->dev); | 1040 | struct net_device *dev = dev_get_drvdata(&op->dev); |
| 1041 | 1041 | ||
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c index dbaf72cbb233..0b4cb6f15984 100644 --- a/drivers/net/fec_mpc52xx_phy.c +++ b/drivers/net/fec_mpc52xx_phy.c | |||
| @@ -61,7 +61,7 @@ static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg, | |||
| 61 | data | FEC_MII_WRITE_FRAME); | 61 | data | FEC_MII_WRITE_FRAME); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | static int mpc52xx_fec_mdio_probe(struct of_device *of, | 64 | static int mpc52xx_fec_mdio_probe(struct platform_device *of, |
| 65 | const struct of_device_id *match) | 65 | const struct of_device_id *match) |
| 66 | { | 66 | { |
| 67 | struct device *dev = &of->dev; | 67 | struct device *dev = &of->dev; |
| @@ -122,7 +122,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, | |||
| 122 | return err; | 122 | return err; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | static int mpc52xx_fec_mdio_remove(struct of_device *of) | 125 | static int mpc52xx_fec_mdio_remove(struct platform_device *of) |
| 126 | { | 126 | { |
| 127 | struct device *dev = &of->dev; | 127 | struct device *dev = &of->dev; |
| 128 | struct mii_bus *bus = dev_get_drvdata(dev); | 128 | struct mii_bus *bus = dev_get_drvdata(dev); |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index f08cff9020bd..d6e3111959ab 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
| @@ -997,7 +997,7 @@ static const struct net_device_ops fs_enet_netdev_ops = { | |||
| 997 | #endif | 997 | #endif |
| 998 | }; | 998 | }; |
| 999 | 999 | ||
| 1000 | static int __devinit fs_enet_probe(struct of_device *ofdev, | 1000 | static int __devinit fs_enet_probe(struct platform_device *ofdev, |
| 1001 | const struct of_device_id *match) | 1001 | const struct of_device_id *match) |
| 1002 | { | 1002 | { |
| 1003 | struct net_device *ndev; | 1003 | struct net_device *ndev; |
| @@ -1105,7 +1105,7 @@ out_free_fpi: | |||
| 1105 | return ret; | 1105 | return ret; |
| 1106 | } | 1106 | } |
| 1107 | 1107 | ||
| 1108 | static int fs_enet_remove(struct of_device *ofdev) | 1108 | static int fs_enet_remove(struct platform_device *ofdev) |
| 1109 | { | 1109 | { |
| 1110 | struct net_device *ndev = dev_get_drvdata(&ofdev->dev); | 1110 | struct net_device *ndev = dev_get_drvdata(&ofdev->dev); |
| 1111 | struct fs_enet_private *fep = netdev_priv(ndev); | 1111 | struct fs_enet_private *fep = netdev_priv(ndev); |
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index 48e91b6242ce..7a84e45487e8 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
| @@ -84,7 +84,7 @@ static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op) | |||
| 84 | 84 | ||
| 85 | static int do_pd_setup(struct fs_enet_private *fep) | 85 | static int do_pd_setup(struct fs_enet_private *fep) |
| 86 | { | 86 | { |
| 87 | struct of_device *ofdev = to_of_device(fep->dev); | 87 | struct platform_device *ofdev = to_platform_device(fep->dev); |
| 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 | ||
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index 7ca1642276d0..61035fc5599b 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
| @@ -96,7 +96,7 @@ static int whack_reset(struct fec __iomem *fecp) | |||
| 96 | 96 | ||
| 97 | static int do_pd_setup(struct fs_enet_private *fep) | 97 | static int do_pd_setup(struct fs_enet_private *fep) |
| 98 | { | 98 | { |
| 99 | struct of_device *ofdev = to_of_device(fep->dev); | 99 | struct platform_device *ofdev = to_platform_device(fep->dev); |
| 100 | 100 | ||
| 101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_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) |
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index a3c44544846d..22a02a767069 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
| @@ -96,7 +96,7 @@ static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op) | |||
| 96 | 96 | ||
| 97 | static int do_pd_setup(struct fs_enet_private *fep) | 97 | static int do_pd_setup(struct fs_enet_private *fep) |
| 98 | { | 98 | { |
| 99 | struct of_device *ofdev = to_of_device(fep->dev); | 99 | struct platform_device *ofdev = to_platform_device(fep->dev); |
| 100 | 100 | ||
| 101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_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) |
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c index 3607340f3da7..3cda2b515471 100644 --- a/drivers/net/fs_enet/mii-bitbang.c +++ b/drivers/net/fs_enet/mii-bitbang.c | |||
| @@ -150,7 +150,7 @@ static int __devinit fs_mii_bitbang_init(struct mii_bus *bus, | |||
| 150 | return 0; | 150 | return 0; |
| 151 | } | 151 | } |
| 152 | 152 | ||
| 153 | static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | 153 | static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev, |
| 154 | const struct of_device_id *match) | 154 | const struct of_device_id *match) |
| 155 | { | 155 | { |
| 156 | struct mii_bus *new_bus; | 156 | struct mii_bus *new_bus; |
| @@ -200,7 +200,7 @@ out: | |||
| 200 | return ret; | 200 | return ret; |
| 201 | } | 201 | } |
| 202 | 202 | ||
| 203 | static int fs_enet_mdio_remove(struct of_device *ofdev) | 203 | static int fs_enet_mdio_remove(struct platform_device *ofdev) |
| 204 | { | 204 | { |
| 205 | struct mii_bus *bus = dev_get_drvdata(&ofdev->dev); | 205 | struct mii_bus *bus = dev_get_drvdata(&ofdev->dev); |
| 206 | struct bb_info *bitbang = bus->priv; | 206 | struct bb_info *bitbang = bus->priv; |
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index bddffd169b93..dbb9c48623df 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
| @@ -101,7 +101,7 @@ static int fs_enet_fec_mii_reset(struct mii_bus *bus) | |||
| 101 | return 0; | 101 | return 0; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | 104 | static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev, |
| 105 | const struct of_device_id *match) | 105 | const struct of_device_id *match) |
| 106 | { | 106 | { |
| 107 | struct resource res; | 107 | struct resource res; |
| @@ -192,7 +192,7 @@ out: | |||
| 192 | return ret; | 192 | return ret; |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | static int fs_enet_mdio_remove(struct of_device *ofdev) | 195 | static int fs_enet_mdio_remove(struct platform_device *ofdev) |
| 196 | { | 196 | { |
| 197 | struct mii_bus *bus = dev_get_drvdata(&ofdev->dev); | 197 | struct mii_bus *bus = dev_get_drvdata(&ofdev->dev); |
| 198 | struct fec_info *fec = bus->priv; | 198 | struct fec_info *fec = bus->priv; |
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c index f53f850b6418..d4bf91aac25f 100644 --- a/drivers/net/fsl_pq_mdio.c +++ b/drivers/net/fsl_pq_mdio.c | |||
| @@ -265,7 +265,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id) | |||
| 265 | #endif | 265 | #endif |
| 266 | 266 | ||
| 267 | 267 | ||
| 268 | static int fsl_pq_mdio_probe(struct of_device *ofdev, | 268 | static int fsl_pq_mdio_probe(struct platform_device *ofdev, |
| 269 | const struct of_device_id *match) | 269 | const struct of_device_id *match) |
| 270 | { | 270 | { |
| 271 | struct device_node *np = ofdev->dev.of_node; | 271 | struct device_node *np = ofdev->dev.of_node; |
| @@ -425,7 +425,7 @@ err_free_priv: | |||
| 425 | } | 425 | } |
| 426 | 426 | ||
| 427 | 427 | ||
| 428 | static int fsl_pq_mdio_remove(struct of_device *ofdev) | 428 | static int fsl_pq_mdio_remove(struct platform_device *ofdev) |
| 429 | { | 429 | { |
| 430 | struct device *device = &ofdev->dev; | 430 | struct device *device = &ofdev->dev; |
| 431 | struct mii_bus *bus = dev_get_drvdata(device); | 431 | struct mii_bus *bus = dev_get_drvdata(device); |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index a1b6301bc674..4f7c3f3ca234 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
| @@ -122,9 +122,9 @@ static irqreturn_t gfar_interrupt(int irq, void *dev_id); | |||
| 122 | static void adjust_link(struct net_device *dev); | 122 | static void adjust_link(struct net_device *dev); |
| 123 | static void init_registers(struct net_device *dev); | 123 | static void init_registers(struct net_device *dev); |
| 124 | static int init_phy(struct net_device *dev); | 124 | static int init_phy(struct net_device *dev); |
| 125 | static int gfar_probe(struct of_device *ofdev, | 125 | static int gfar_probe(struct platform_device *ofdev, |
| 126 | const struct of_device_id *match); | 126 | const struct of_device_id *match); |
| 127 | static int gfar_remove(struct of_device *ofdev); | 127 | static int gfar_remove(struct platform_device *ofdev); |
| 128 | static void free_skb_resources(struct gfar_private *priv); | 128 | static void free_skb_resources(struct gfar_private *priv); |
| 129 | static void gfar_set_multi(struct net_device *dev); | 129 | static void gfar_set_multi(struct net_device *dev); |
| 130 | static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr); | 130 | static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr); |
| @@ -605,7 +605,7 @@ static int gfar_parse_group(struct device_node *np, | |||
| 605 | return 0; | 605 | return 0; |
| 606 | } | 606 | } |
| 607 | 607 | ||
| 608 | static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) | 608 | static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev) |
| 609 | { | 609 | { |
| 610 | const char *model; | 610 | const char *model; |
| 611 | const char *ctype; | 611 | const char *ctype; |
| @@ -959,7 +959,7 @@ static void gfar_detect_errata(struct gfar_private *priv) | |||
| 959 | 959 | ||
| 960 | /* Set up the ethernet device structure, private data, | 960 | /* Set up the ethernet device structure, private data, |
| 961 | * and anything else we need before we start */ | 961 | * and anything else we need before we start */ |
| 962 | static int gfar_probe(struct of_device *ofdev, | 962 | static int gfar_probe(struct platform_device *ofdev, |
| 963 | const struct of_device_id *match) | 963 | const struct of_device_id *match) |
| 964 | { | 964 | { |
| 965 | u32 tempval; | 965 | u32 tempval; |
| @@ -1238,7 +1238,7 @@ register_fail: | |||
| 1238 | return err; | 1238 | return err; |
| 1239 | } | 1239 | } |
| 1240 | 1240 | ||
| 1241 | static int gfar_remove(struct of_device *ofdev) | 1241 | static int gfar_remove(struct platform_device *ofdev) |
| 1242 | { | 1242 | { |
| 1243 | struct gfar_private *priv = dev_get_drvdata(&ofdev->dev); | 1243 | struct gfar_private *priv = dev_get_drvdata(&ofdev->dev); |
| 1244 | 1244 | ||
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h index 710810e2adb4..68984eb88ae0 100644 --- a/drivers/net/gianfar.h +++ b/drivers/net/gianfar.h | |||
| @@ -1054,7 +1054,7 @@ struct gfar_private { | |||
| 1054 | 1054 | ||
| 1055 | struct device_node *node; | 1055 | struct device_node *node; |
| 1056 | struct net_device *ndev; | 1056 | struct net_device *ndev; |
| 1057 | struct of_device *ofdev; | 1057 | struct platform_device *ofdev; |
| 1058 | enum gfar_errata errata; | 1058 | enum gfar_errata errata; |
| 1059 | 1059 | ||
| 1060 | struct gfar_priv_grp gfargrp[MAXGROUPS]; | 1060 | struct gfar_priv_grp gfargrp[MAXGROUPS]; |
diff --git a/drivers/net/greth.c b/drivers/net/greth.c index 4d09eab3548e..f15c64f1cd38 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c | |||
| @@ -1373,7 +1373,7 @@ error: | |||
| 1373 | } | 1373 | } |
| 1374 | 1374 | ||
| 1375 | /* Initialize the GRETH MAC */ | 1375 | /* Initialize the GRETH MAC */ |
| 1376 | static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_device_id *match) | 1376 | static int __devinit greth_of_probe(struct platform_device *ofdev, const struct of_device_id *match) |
| 1377 | { | 1377 | { |
| 1378 | struct net_device *dev; | 1378 | struct net_device *dev; |
| 1379 | struct greth_private *greth; | 1379 | struct greth_private *greth; |
| @@ -1412,7 +1412,7 @@ static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_dev | |||
| 1412 | } | 1412 | } |
| 1413 | 1413 | ||
| 1414 | regs = (struct greth_regs *) greth->regs; | 1414 | regs = (struct greth_regs *) greth->regs; |
| 1415 | greth->irq = ofdev->irqs[0]; | 1415 | greth->irq = ofdev->archdata.irqs[0]; |
| 1416 | 1416 | ||
| 1417 | dev_set_drvdata(greth->dev, dev); | 1417 | dev_set_drvdata(greth->dev, dev); |
| 1418 | SET_NETDEV_DEV(dev, greth->dev); | 1418 | SET_NETDEV_DEV(dev, greth->dev); |
| @@ -1572,7 +1572,7 @@ error1: | |||
| 1572 | return err; | 1572 | return err; |
| 1573 | } | 1573 | } |
| 1574 | 1574 | ||
| 1575 | static int __devexit greth_of_remove(struct of_device *of_dev) | 1575 | static int __devexit greth_of_remove(struct platform_device *of_dev) |
| 1576 | { | 1576 | { |
| 1577 | struct net_device *ndev = dev_get_drvdata(&of_dev->dev); | 1577 | struct net_device *ndev = dev_get_drvdata(&of_dev->dev); |
| 1578 | struct greth_private *greth = netdev_priv(ndev); | 1578 | struct greth_private *greth = netdev_priv(ndev); |
diff --git a/drivers/net/greth.h b/drivers/net/greth.h index 973388d6abca..03ad903cd676 100644 --- a/drivers/net/greth.h +++ b/drivers/net/greth.h | |||
| @@ -118,7 +118,7 @@ struct greth_private { | |||
| 118 | 118 | ||
| 119 | int irq; | 119 | int irq; |
| 120 | 120 | ||
| 121 | struct device *dev; /* Pointer to of_device->dev */ | 121 | struct device *dev; /* Pointer to platform_device->dev */ |
| 122 | struct net_device *netdev; | 122 | struct net_device *netdev; |
| 123 | struct napi_struct napi; | 123 | struct napi_struct napi; |
| 124 | spinlock_t devlock; | 124 | spinlock_t devlock; |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index eeec7bc2ce74..3506fd6ad726 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
| @@ -2245,7 +2245,7 @@ static int emac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) | |||
| 2245 | struct emac_depentry { | 2245 | struct emac_depentry { |
| 2246 | u32 phandle; | 2246 | u32 phandle; |
| 2247 | struct device_node *node; | 2247 | struct device_node *node; |
| 2248 | struct of_device *ofdev; | 2248 | struct platform_device *ofdev; |
| 2249 | void *drvdata; | 2249 | void *drvdata; |
| 2250 | }; | 2250 | }; |
| 2251 | 2251 | ||
| @@ -2719,7 +2719,7 @@ static const struct net_device_ops emac_gige_netdev_ops = { | |||
| 2719 | .ndo_change_mtu = emac_change_mtu, | 2719 | .ndo_change_mtu = emac_change_mtu, |
| 2720 | }; | 2720 | }; |
| 2721 | 2721 | ||
| 2722 | static int __devinit emac_probe(struct of_device *ofdev, | 2722 | static int __devinit emac_probe(struct platform_device *ofdev, |
| 2723 | const struct of_device_id *match) | 2723 | const struct of_device_id *match) |
| 2724 | { | 2724 | { |
| 2725 | struct net_device *ndev; | 2725 | struct net_device *ndev; |
| @@ -2941,7 +2941,7 @@ static int __devinit emac_probe(struct of_device *ofdev, | |||
| 2941 | return err; | 2941 | return err; |
| 2942 | } | 2942 | } |
| 2943 | 2943 | ||
| 2944 | static int __devexit emac_remove(struct of_device *ofdev) | 2944 | static int __devexit emac_remove(struct platform_device *ofdev) |
| 2945 | { | 2945 | { |
| 2946 | struct emac_instance *dev = dev_get_drvdata(&ofdev->dev); | 2946 | struct emac_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 2947 | 2947 | ||
diff --git a/drivers/net/ibm_newemac/core.h b/drivers/net/ibm_newemac/core.h index b1cbe6fdfc7a..9e37e3d9c51d 100644 --- a/drivers/net/ibm_newemac/core.h +++ b/drivers/net/ibm_newemac/core.h | |||
| @@ -170,12 +170,12 @@ struct emac_instance { | |||
| 170 | struct net_device *ndev; | 170 | struct net_device *ndev; |
| 171 | struct resource rsrc_regs; | 171 | struct resource rsrc_regs; |
| 172 | struct emac_regs __iomem *emacp; | 172 | struct emac_regs __iomem *emacp; |
| 173 | struct of_device *ofdev; | 173 | struct platform_device *ofdev; |
| 174 | struct device_node **blist; /* bootlist entry */ | 174 | struct device_node **blist; /* bootlist entry */ |
| 175 | 175 | ||
| 176 | /* MAL linkage */ | 176 | /* MAL linkage */ |
| 177 | u32 mal_ph; | 177 | u32 mal_ph; |
| 178 | struct of_device *mal_dev; | 178 | struct platform_device *mal_dev; |
| 179 | u32 mal_rx_chan; | 179 | u32 mal_rx_chan; |
| 180 | u32 mal_tx_chan; | 180 | u32 mal_tx_chan; |
| 181 | struct mal_instance *mal; | 181 | struct mal_instance *mal; |
| @@ -196,24 +196,24 @@ struct emac_instance { | |||
| 196 | 196 | ||
| 197 | /* Shared MDIO if any */ | 197 | /* Shared MDIO if any */ |
| 198 | u32 mdio_ph; | 198 | u32 mdio_ph; |
| 199 | struct of_device *mdio_dev; | 199 | struct platform_device *mdio_dev; |
| 200 | struct emac_instance *mdio_instance; | 200 | struct emac_instance *mdio_instance; |
| 201 | struct mutex mdio_lock; | 201 | struct mutex mdio_lock; |
| 202 | 202 | ||
| 203 | /* ZMII infos if any */ | 203 | /* ZMII infos if any */ |
| 204 | u32 zmii_ph; | 204 | u32 zmii_ph; |
| 205 | u32 zmii_port; | 205 | u32 zmii_port; |
| 206 | struct of_device *zmii_dev; | 206 | struct platform_device *zmii_dev; |
| 207 | 207 | ||
| 208 | /* RGMII infos if any */ | 208 | /* RGMII infos if any */ |
| 209 | u32 rgmii_ph; | 209 | u32 rgmii_ph; |
| 210 | u32 rgmii_port; | 210 | u32 rgmii_port; |
| 211 | struct of_device *rgmii_dev; | 211 | struct platform_device *rgmii_dev; |
| 212 | 212 | ||
| 213 | /* TAH infos if any */ | 213 | /* TAH infos if any */ |
| 214 | u32 tah_ph; | 214 | u32 tah_ph; |
| 215 | u32 tah_port; | 215 | u32 tah_port; |
| 216 | struct of_device *tah_dev; | 216 | struct platform_device *tah_dev; |
| 217 | 217 | ||
| 218 | /* IRQs */ | 218 | /* IRQs */ |
| 219 | int wol_irq; | 219 | int wol_irq; |
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index fcff9e0bd382..d5717e2123e1 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c | |||
| @@ -517,7 +517,7 @@ void *mal_dump_regs(struct mal_instance *mal, void *buf) | |||
| 517 | return regs + 1; | 517 | return regs + 1; |
| 518 | } | 518 | } |
| 519 | 519 | ||
| 520 | static int __devinit mal_probe(struct of_device *ofdev, | 520 | static int __devinit mal_probe(struct platform_device *ofdev, |
| 521 | const struct of_device_id *match) | 521 | const struct of_device_id *match) |
| 522 | { | 522 | { |
| 523 | struct mal_instance *mal; | 523 | struct mal_instance *mal; |
| @@ -730,7 +730,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
| 730 | return err; | 730 | return err; |
| 731 | } | 731 | } |
| 732 | 732 | ||
| 733 | static int __devexit mal_remove(struct of_device *ofdev) | 733 | static int __devexit mal_remove(struct platform_device *ofdev) |
| 734 | { | 734 | { |
| 735 | struct mal_instance *mal = dev_get_drvdata(&ofdev->dev); | 735 | struct mal_instance *mal = dev_get_drvdata(&ofdev->dev); |
| 736 | 736 | ||
diff --git a/drivers/net/ibm_newemac/mal.h b/drivers/net/ibm_newemac/mal.h index 9ededfbf0726..66084214bf45 100644 --- a/drivers/net/ibm_newemac/mal.h +++ b/drivers/net/ibm_newemac/mal.h | |||
| @@ -210,7 +210,7 @@ struct mal_instance { | |||
| 210 | dma_addr_t bd_dma; | 210 | dma_addr_t bd_dma; |
| 211 | struct mal_descriptor *bd_virt; | 211 | struct mal_descriptor *bd_virt; |
| 212 | 212 | ||
| 213 | struct of_device *ofdev; | 213 | struct platform_device *ofdev; |
| 214 | int index; | 214 | int index; |
| 215 | spinlock_t lock; | 215 | spinlock_t lock; |
| 216 | 216 | ||
diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c index 108919bcdf13..dd61798897ac 100644 --- a/drivers/net/ibm_newemac/rgmii.c +++ b/drivers/net/ibm_newemac/rgmii.c | |||
| @@ -93,7 +93,7 @@ static inline u32 rgmii_mode_mask(int mode, int input) | |||
| 93 | } | 93 | } |
| 94 | } | 94 | } |
| 95 | 95 | ||
| 96 | int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) | 96 | int __devinit rgmii_attach(struct platform_device *ofdev, int input, int mode) |
| 97 | { | 97 | { |
| 98 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 98 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 99 | struct rgmii_regs __iomem *p = dev->base; | 99 | struct rgmii_regs __iomem *p = dev->base; |
| @@ -122,7 +122,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) | |||
| 122 | return 0; | 122 | return 0; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | void rgmii_set_speed(struct of_device *ofdev, int input, int speed) | 125 | void rgmii_set_speed(struct platform_device *ofdev, int input, int speed) |
| 126 | { | 126 | { |
| 127 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 127 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 128 | struct rgmii_regs __iomem *p = dev->base; | 128 | struct rgmii_regs __iomem *p = dev->base; |
| @@ -144,7 +144,7 @@ void rgmii_set_speed(struct of_device *ofdev, int input, int speed) | |||
| 144 | mutex_unlock(&dev->lock); | 144 | mutex_unlock(&dev->lock); |
| 145 | } | 145 | } |
| 146 | 146 | ||
| 147 | void rgmii_get_mdio(struct of_device *ofdev, int input) | 147 | void rgmii_get_mdio(struct platform_device *ofdev, int input) |
| 148 | { | 148 | { |
| 149 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 149 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 150 | struct rgmii_regs __iomem *p = dev->base; | 150 | struct rgmii_regs __iomem *p = dev->base; |
| @@ -165,7 +165,7 @@ void rgmii_get_mdio(struct of_device *ofdev, int input) | |||
| 165 | DBG2(dev, " fer = 0x%08x\n", fer); | 165 | DBG2(dev, " fer = 0x%08x\n", fer); |
| 166 | } | 166 | } |
| 167 | 167 | ||
| 168 | void rgmii_put_mdio(struct of_device *ofdev, int input) | 168 | void rgmii_put_mdio(struct platform_device *ofdev, int input) |
| 169 | { | 169 | { |
| 170 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 170 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 171 | struct rgmii_regs __iomem *p = dev->base; | 171 | struct rgmii_regs __iomem *p = dev->base; |
| @@ -186,7 +186,7 @@ void rgmii_put_mdio(struct of_device *ofdev, int input) | |||
| 186 | mutex_unlock(&dev->lock); | 186 | mutex_unlock(&dev->lock); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | void rgmii_detach(struct of_device *ofdev, int input) | 189 | void rgmii_detach(struct platform_device *ofdev, int input) |
| 190 | { | 190 | { |
| 191 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 191 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 192 | struct rgmii_regs __iomem *p; | 192 | struct rgmii_regs __iomem *p; |
| @@ -206,13 +206,13 @@ void rgmii_detach(struct of_device *ofdev, int input) | |||
| 206 | mutex_unlock(&dev->lock); | 206 | mutex_unlock(&dev->lock); |
| 207 | } | 207 | } |
| 208 | 208 | ||
| 209 | int rgmii_get_regs_len(struct of_device *ofdev) | 209 | int rgmii_get_regs_len(struct platform_device *ofdev) |
| 210 | { | 210 | { |
| 211 | return sizeof(struct emac_ethtool_regs_subhdr) + | 211 | return sizeof(struct emac_ethtool_regs_subhdr) + |
| 212 | sizeof(struct rgmii_regs); | 212 | sizeof(struct rgmii_regs); |
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | void *rgmii_dump_regs(struct of_device *ofdev, void *buf) | 215 | void *rgmii_dump_regs(struct platform_device *ofdev, void *buf) |
| 216 | { | 216 | { |
| 217 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 217 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 218 | struct emac_ethtool_regs_subhdr *hdr = buf; | 218 | struct emac_ethtool_regs_subhdr *hdr = buf; |
| @@ -228,7 +228,7 @@ void *rgmii_dump_regs(struct of_device *ofdev, void *buf) | |||
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | 230 | ||
| 231 | static int __devinit rgmii_probe(struct of_device *ofdev, | 231 | static int __devinit rgmii_probe(struct platform_device *ofdev, |
| 232 | const struct of_device_id *match) | 232 | const struct of_device_id *match) |
| 233 | { | 233 | { |
| 234 | struct device_node *np = ofdev->dev.of_node; | 234 | struct device_node *np = ofdev->dev.of_node; |
| @@ -293,7 +293,7 @@ static int __devinit rgmii_probe(struct of_device *ofdev, | |||
| 293 | return rc; | 293 | return rc; |
| 294 | } | 294 | } |
| 295 | 295 | ||
| 296 | static int __devexit rgmii_remove(struct of_device *ofdev) | 296 | static int __devexit rgmii_remove(struct platform_device *ofdev) |
| 297 | { | 297 | { |
| 298 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 298 | struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 299 | 299 | ||
diff --git a/drivers/net/ibm_newemac/rgmii.h b/drivers/net/ibm_newemac/rgmii.h index c4a4b358a270..d69799049865 100644 --- a/drivers/net/ibm_newemac/rgmii.h +++ b/drivers/net/ibm_newemac/rgmii.h | |||
| @@ -51,20 +51,20 @@ struct rgmii_instance { | |||
| 51 | int users; | 51 | int users; |
| 52 | 52 | ||
| 53 | /* OF device instance */ | 53 | /* OF device instance */ |
| 54 | struct of_device *ofdev; | 54 | struct platform_device *ofdev; |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | #ifdef CONFIG_IBM_NEW_EMAC_RGMII | 57 | #ifdef CONFIG_IBM_NEW_EMAC_RGMII |
| 58 | 58 | ||
| 59 | extern int rgmii_init(void); | 59 | extern int rgmii_init(void); |
| 60 | extern void rgmii_exit(void); | 60 | extern void rgmii_exit(void); |
| 61 | extern int rgmii_attach(struct of_device *ofdev, int input, int mode); | 61 | extern int rgmii_attach(struct platform_device *ofdev, int input, int mode); |
| 62 | extern void rgmii_detach(struct of_device *ofdev, int input); | 62 | extern void rgmii_detach(struct platform_device *ofdev, int input); |
| 63 | extern void rgmii_get_mdio(struct of_device *ofdev, int input); | 63 | extern void rgmii_get_mdio(struct platform_device *ofdev, int input); |
| 64 | extern void rgmii_put_mdio(struct of_device *ofdev, int input); | 64 | extern void rgmii_put_mdio(struct platform_device *ofdev, int input); |
| 65 | extern void rgmii_set_speed(struct of_device *ofdev, int input, int speed); | 65 | extern void rgmii_set_speed(struct platform_device *ofdev, int input, int speed); |
| 66 | extern int rgmii_get_regs_len(struct of_device *ofdev); | 66 | extern int rgmii_get_regs_len(struct platform_device *ofdev); |
| 67 | extern void *rgmii_dump_regs(struct of_device *ofdev, void *buf); | 67 | extern void *rgmii_dump_regs(struct platform_device *ofdev, void *buf); |
| 68 | 68 | ||
| 69 | #else | 69 | #else |
| 70 | 70 | ||
diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c index 044637144c43..299aa49490c0 100644 --- a/drivers/net/ibm_newemac/tah.c +++ b/drivers/net/ibm_newemac/tah.c | |||
| @@ -23,7 +23,7 @@ | |||
| 23 | #include "emac.h" | 23 | #include "emac.h" |
| 24 | #include "core.h" | 24 | #include "core.h" |
| 25 | 25 | ||
| 26 | int __devinit tah_attach(struct of_device *ofdev, int channel) | 26 | int __devinit tah_attach(struct platform_device *ofdev, int channel) |
| 27 | { | 27 | { |
| 28 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); | 28 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 29 | 29 | ||
| @@ -35,7 +35,7 @@ int __devinit tah_attach(struct of_device *ofdev, int channel) | |||
| 35 | return 0; | 35 | return 0; |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | void tah_detach(struct of_device *ofdev, int channel) | 38 | void tah_detach(struct platform_device *ofdev, int channel) |
| 39 | { | 39 | { |
| 40 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); | 40 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 41 | 41 | ||
| @@ -44,7 +44,7 @@ void tah_detach(struct of_device *ofdev, int channel) | |||
| 44 | mutex_unlock(&dev->lock); | 44 | mutex_unlock(&dev->lock); |
| 45 | } | 45 | } |
| 46 | 46 | ||
| 47 | void tah_reset(struct of_device *ofdev) | 47 | void tah_reset(struct platform_device *ofdev) |
| 48 | { | 48 | { |
| 49 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); | 49 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 50 | struct tah_regs __iomem *p = dev->base; | 50 | struct tah_regs __iomem *p = dev->base; |
| @@ -66,13 +66,13 @@ void tah_reset(struct of_device *ofdev) | |||
| 66 | TAH_MR_DIG); | 66 | TAH_MR_DIG); |
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | int tah_get_regs_len(struct of_device *ofdev) | 69 | int tah_get_regs_len(struct platform_device *ofdev) |
| 70 | { | 70 | { |
| 71 | return sizeof(struct emac_ethtool_regs_subhdr) + | 71 | return sizeof(struct emac_ethtool_regs_subhdr) + |
| 72 | sizeof(struct tah_regs); | 72 | sizeof(struct tah_regs); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | void *tah_dump_regs(struct of_device *ofdev, void *buf) | 75 | void *tah_dump_regs(struct platform_device *ofdev, void *buf) |
| 76 | { | 76 | { |
| 77 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); | 77 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 78 | struct emac_ethtool_regs_subhdr *hdr = buf; | 78 | struct emac_ethtool_regs_subhdr *hdr = buf; |
| @@ -87,7 +87,7 @@ void *tah_dump_regs(struct of_device *ofdev, void *buf) | |||
| 87 | return regs + 1; | 87 | return regs + 1; |
| 88 | } | 88 | } |
| 89 | 89 | ||
| 90 | static int __devinit tah_probe(struct of_device *ofdev, | 90 | static int __devinit tah_probe(struct platform_device *ofdev, |
| 91 | const struct of_device_id *match) | 91 | const struct of_device_id *match) |
| 92 | { | 92 | { |
| 93 | struct device_node *np = ofdev->dev.of_node; | 93 | struct device_node *np = ofdev->dev.of_node; |
| @@ -139,7 +139,7 @@ static int __devinit tah_probe(struct of_device *ofdev, | |||
| 139 | return rc; | 139 | return rc; |
| 140 | } | 140 | } |
| 141 | 141 | ||
| 142 | static int __devexit tah_remove(struct of_device *ofdev) | 142 | static int __devexit tah_remove(struct platform_device *ofdev) |
| 143 | { | 143 | { |
| 144 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); | 144 | struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 145 | 145 | ||
diff --git a/drivers/net/ibm_newemac/tah.h b/drivers/net/ibm_newemac/tah.h index a068b5658dad..61dbeca006d1 100644 --- a/drivers/net/ibm_newemac/tah.h +++ b/drivers/net/ibm_newemac/tah.h | |||
| @@ -48,7 +48,7 @@ struct tah_instance { | |||
| 48 | int users; | 48 | int users; |
| 49 | 49 | ||
| 50 | /* OF device instance */ | 50 | /* OF device instance */ |
| 51 | struct of_device *ofdev; | 51 | struct platform_device *ofdev; |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | 54 | ||
| @@ -74,11 +74,11 @@ struct tah_instance { | |||
| 74 | 74 | ||
| 75 | extern int tah_init(void); | 75 | extern int tah_init(void); |
| 76 | extern void tah_exit(void); | 76 | extern void tah_exit(void); |
| 77 | extern int tah_attach(struct of_device *ofdev, int channel); | 77 | extern int tah_attach(struct platform_device *ofdev, int channel); |
| 78 | extern void tah_detach(struct of_device *ofdev, int channel); | 78 | extern void tah_detach(struct platform_device *ofdev, int channel); |
| 79 | extern void tah_reset(struct of_device *ofdev); | 79 | extern void tah_reset(struct platform_device *ofdev); |
| 80 | extern int tah_get_regs_len(struct of_device *ofdev); | 80 | extern int tah_get_regs_len(struct platform_device *ofdev); |
| 81 | extern void *tah_dump_regs(struct of_device *ofdev, void *buf); | 81 | extern void *tah_dump_regs(struct platform_device *ofdev, void *buf); |
| 82 | 82 | ||
| 83 | #else | 83 | #else |
| 84 | 84 | ||
diff --git a/drivers/net/ibm_newemac/zmii.c b/drivers/net/ibm_newemac/zmii.c index 046dcd069c45..34ed6ee8ca8a 100644 --- a/drivers/net/ibm_newemac/zmii.c +++ b/drivers/net/ibm_newemac/zmii.c | |||
| @@ -82,7 +82,7 @@ static inline u32 zmii_mode_mask(int mode, int input) | |||
| 82 | } | 82 | } |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode) | 85 | int __devinit zmii_attach(struct platform_device *ofdev, int input, int *mode) |
| 86 | { | 86 | { |
| 87 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 87 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 88 | struct zmii_regs __iomem *p = dev->base; | 88 | struct zmii_regs __iomem *p = dev->base; |
| @@ -148,7 +148,7 @@ int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode) | |||
| 148 | return 0; | 148 | return 0; |
| 149 | } | 149 | } |
| 150 | 150 | ||
| 151 | void zmii_get_mdio(struct of_device *ofdev, int input) | 151 | void zmii_get_mdio(struct platform_device *ofdev, int input) |
| 152 | { | 152 | { |
| 153 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 153 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 154 | u32 fer; | 154 | u32 fer; |
| @@ -161,7 +161,7 @@ void zmii_get_mdio(struct of_device *ofdev, int input) | |||
| 161 | out_be32(&dev->base->fer, fer | ZMII_FER_MDI(input)); | 161 | out_be32(&dev->base->fer, fer | ZMII_FER_MDI(input)); |
| 162 | } | 162 | } |
| 163 | 163 | ||
| 164 | void zmii_put_mdio(struct of_device *ofdev, int input) | 164 | void zmii_put_mdio(struct platform_device *ofdev, int input) |
| 165 | { | 165 | { |
| 166 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 166 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 167 | 167 | ||
| @@ -170,7 +170,7 @@ void zmii_put_mdio(struct of_device *ofdev, int input) | |||
| 170 | } | 170 | } |
| 171 | 171 | ||
| 172 | 172 | ||
| 173 | void zmii_set_speed(struct of_device *ofdev, int input, int speed) | 173 | void zmii_set_speed(struct platform_device *ofdev, int input, int speed) |
| 174 | { | 174 | { |
| 175 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 175 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 176 | u32 ssr; | 176 | u32 ssr; |
| @@ -191,7 +191,7 @@ void zmii_set_speed(struct of_device *ofdev, int input, int speed) | |||
| 191 | mutex_unlock(&dev->lock); | 191 | mutex_unlock(&dev->lock); |
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | void zmii_detach(struct of_device *ofdev, int input) | 194 | void zmii_detach(struct platform_device *ofdev, int input) |
| 195 | { | 195 | { |
| 196 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 196 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 197 | 197 | ||
| @@ -210,13 +210,13 @@ void zmii_detach(struct of_device *ofdev, int input) | |||
| 210 | mutex_unlock(&dev->lock); | 210 | mutex_unlock(&dev->lock); |
| 211 | } | 211 | } |
| 212 | 212 | ||
| 213 | int zmii_get_regs_len(struct of_device *ofdev) | 213 | int zmii_get_regs_len(struct platform_device *ofdev) |
| 214 | { | 214 | { |
| 215 | return sizeof(struct emac_ethtool_regs_subhdr) + | 215 | return sizeof(struct emac_ethtool_regs_subhdr) + |
| 216 | sizeof(struct zmii_regs); | 216 | sizeof(struct zmii_regs); |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | void *zmii_dump_regs(struct of_device *ofdev, void *buf) | 219 | void *zmii_dump_regs(struct platform_device *ofdev, void *buf) |
| 220 | { | 220 | { |
| 221 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 221 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 222 | struct emac_ethtool_regs_subhdr *hdr = buf; | 222 | struct emac_ethtool_regs_subhdr *hdr = buf; |
| @@ -231,7 +231,7 @@ void *zmii_dump_regs(struct of_device *ofdev, void *buf) | |||
| 231 | return regs + 1; | 231 | return regs + 1; |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | static int __devinit zmii_probe(struct of_device *ofdev, | 234 | static int __devinit zmii_probe(struct platform_device *ofdev, |
| 235 | const struct of_device_id *match) | 235 | const struct of_device_id *match) |
| 236 | { | 236 | { |
| 237 | struct device_node *np = ofdev->dev.of_node; | 237 | struct device_node *np = ofdev->dev.of_node; |
| @@ -286,7 +286,7 @@ static int __devinit zmii_probe(struct of_device *ofdev, | |||
| 286 | return rc; | 286 | return rc; |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | static int __devexit zmii_remove(struct of_device *ofdev) | 289 | static int __devexit zmii_remove(struct platform_device *ofdev) |
| 290 | { | 290 | { |
| 291 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); | 291 | struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); |
| 292 | 292 | ||
diff --git a/drivers/net/ibm_newemac/zmii.h b/drivers/net/ibm_newemac/zmii.h index 6c9beba0c4b6..1333fa2b2781 100644 --- a/drivers/net/ibm_newemac/zmii.h +++ b/drivers/net/ibm_newemac/zmii.h | |||
| @@ -48,20 +48,20 @@ struct zmii_instance { | |||
| 48 | u32 fer_save; | 48 | u32 fer_save; |
| 49 | 49 | ||
| 50 | /* OF device instance */ | 50 | /* OF device instance */ |
| 51 | struct of_device *ofdev; | 51 | struct platform_device *ofdev; |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | #ifdef CONFIG_IBM_NEW_EMAC_ZMII | 54 | #ifdef CONFIG_IBM_NEW_EMAC_ZMII |
| 55 | 55 | ||
| 56 | extern int zmii_init(void); | 56 | extern int zmii_init(void); |
| 57 | extern void zmii_exit(void); | 57 | extern void zmii_exit(void); |
| 58 | extern int zmii_attach(struct of_device *ofdev, int input, int *mode); | 58 | extern int zmii_attach(struct platform_device *ofdev, int input, int *mode); |
| 59 | extern void zmii_detach(struct of_device *ofdev, int input); | 59 | extern void zmii_detach(struct platform_device *ofdev, int input); |
| 60 | extern void zmii_get_mdio(struct of_device *ofdev, int input); | 60 | extern void zmii_get_mdio(struct platform_device *ofdev, int input); |
| 61 | extern void zmii_put_mdio(struct of_device *ofdev, int input); | 61 | extern void zmii_put_mdio(struct platform_device *ofdev, int input); |
| 62 | extern void zmii_set_speed(struct of_device *ofdev, int input, int speed); | 62 | extern void zmii_set_speed(struct platform_device *ofdev, int input, int speed); |
| 63 | extern int zmii_get_regs_len(struct of_device *ocpdev); | 63 | extern int zmii_get_regs_len(struct platform_device *ocpdev); |
| 64 | extern void *zmii_dump_regs(struct of_device *ofdev, void *buf); | 64 | extern void *zmii_dump_regs(struct platform_device *ofdev, void *buf); |
| 65 | 65 | ||
| 66 | #else | 66 | #else |
| 67 | # define zmii_init() 0 | 67 | # define zmii_init() 0 |
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index 4eea3f70c5cf..c7b624711f5e 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
| @@ -159,7 +159,7 @@ static void temac_dma_dcr_out(struct temac_local *lp, int reg, u32 value) | |||
| 159 | * temac_dcr_setup - If the DMA is DCR based, then setup the address and | 159 | * temac_dcr_setup - If the DMA is DCR based, then setup the address and |
| 160 | * I/O functions | 160 | * I/O functions |
| 161 | */ | 161 | */ |
| 162 | static int temac_dcr_setup(struct temac_local *lp, struct of_device *op, | 162 | static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op, |
| 163 | struct device_node *np) | 163 | struct device_node *np) |
| 164 | { | 164 | { |
| 165 | unsigned int dcrs; | 165 | unsigned int dcrs; |
| @@ -184,7 +184,7 @@ static int temac_dcr_setup(struct temac_local *lp, struct of_device *op, | |||
| 184 | * temac_dcr_setup - This is a stub for when DCR is not supported, | 184 | * temac_dcr_setup - This is a stub for when DCR is not supported, |
| 185 | * such as with MicroBlaze | 185 | * such as with MicroBlaze |
| 186 | */ | 186 | */ |
| 187 | static int temac_dcr_setup(struct temac_local *lp, struct of_device *op, | 187 | static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op, |
| 188 | struct device_node *np) | 188 | struct device_node *np) |
| 189 | { | 189 | { |
| 190 | return -1; | 190 | return -1; |
| @@ -952,7 +952,7 @@ static const struct attribute_group temac_attr_group = { | |||
| 952 | }; | 952 | }; |
| 953 | 953 | ||
| 954 | static int __init | 954 | static int __init |
| 955 | temac_of_probe(struct of_device *op, const struct of_device_id *match) | 955 | temac_of_probe(struct platform_device *op, const struct of_device_id *match) |
| 956 | { | 956 | { |
| 957 | struct device_node *np; | 957 | struct device_node *np; |
| 958 | struct temac_local *lp; | 958 | struct temac_local *lp; |
| @@ -1094,7 +1094,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 1094 | return rc; | 1094 | return rc; |
| 1095 | } | 1095 | } |
| 1096 | 1096 | ||
| 1097 | static int __devexit temac_of_remove(struct of_device *op) | 1097 | static int __devexit temac_of_remove(struct platform_device *op) |
| 1098 | { | 1098 | { |
| 1099 | struct net_device *ndev = dev_get_drvdata(&op->dev); | 1099 | struct net_device *ndev = dev_get_drvdata(&op->dev); |
| 1100 | struct temac_local *lp = netdev_priv(ndev); | 1100 | struct temac_local *lp = netdev_priv(ndev); |
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 04e552aa14ec..617f898ba5f0 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
| @@ -926,7 +926,7 @@ static const struct net_device_ops myri_ops = { | |||
| 926 | .ndo_validate_addr = eth_validate_addr, | 926 | .ndo_validate_addr = eth_validate_addr, |
| 927 | }; | 927 | }; |
| 928 | 928 | ||
| 929 | static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match) | 929 | static int __devinit myri_sbus_probe(struct platform_device *op, const struct of_device_id *match) |
| 930 | { | 930 | { |
| 931 | struct device_node *dp = op->dev.of_node; | 931 | struct device_node *dp = op->dev.of_node; |
| 932 | static unsigned version_printed; | 932 | static unsigned version_printed; |
| @@ -1124,7 +1124,7 @@ err: | |||
| 1124 | return -ENODEV; | 1124 | return -ENODEV; |
| 1125 | } | 1125 | } |
| 1126 | 1126 | ||
| 1127 | static int __devexit myri_sbus_remove(struct of_device *op) | 1127 | static int __devexit myri_sbus_remove(struct platform_device *op) |
| 1128 | { | 1128 | { |
| 1129 | struct myri_eth *mp = dev_get_drvdata(&op->dev); | 1129 | struct myri_eth *mp = dev_get_drvdata(&op->dev); |
| 1130 | struct net_device *net_dev = mp->dev; | 1130 | struct net_device *net_dev = mp->dev; |
diff --git a/drivers/net/myri_sbus.h b/drivers/net/myri_sbus.h index ff363e95d9cf..80a2fa5cf757 100644 --- a/drivers/net/myri_sbus.h +++ b/drivers/net/myri_sbus.h | |||
| @@ -288,7 +288,7 @@ struct myri_eth { | |||
| 288 | struct myri_eeprom eeprom; /* Local copy of EEPROM. */ | 288 | struct myri_eeprom eeprom; /* Local copy of EEPROM. */ |
| 289 | unsigned int reg_size; /* Size of register space. */ | 289 | unsigned int reg_size; /* Size of register space. */ |
| 290 | unsigned int shmem_base; /* Offset to shared ram. */ | 290 | unsigned int shmem_base; /* Offset to shared ram. */ |
| 291 | struct of_device *myri_op; /* Our OF device struct. */ | 291 | struct platform_device *myri_op; /* Our OF device struct. */ |
| 292 | }; | 292 | }; |
| 293 | 293 | ||
| 294 | /* We use this to acquire receive skb's that we can DMA directly into. */ | 294 | /* We use this to acquire receive skb's that we can DMA directly into. */ |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 404f2d552888..bc695d53cdcc 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
| @@ -9103,7 +9103,7 @@ retry: | |||
| 9103 | static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) | 9103 | static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) |
| 9104 | { | 9104 | { |
| 9105 | #ifdef CONFIG_SPARC64 | 9105 | #ifdef CONFIG_SPARC64 |
| 9106 | struct of_device *op = np->op; | 9106 | struct platform_device *op = np->op; |
| 9107 | const u32 *int_prop; | 9107 | const u32 *int_prop; |
| 9108 | int i; | 9108 | int i; |
| 9109 | 9109 | ||
| @@ -9688,7 +9688,7 @@ static void __devinit niu_driver_version(void) | |||
| 9688 | 9688 | ||
| 9689 | static struct net_device * __devinit niu_alloc_and_init( | 9689 | static struct net_device * __devinit niu_alloc_and_init( |
| 9690 | struct device *gen_dev, struct pci_dev *pdev, | 9690 | struct device *gen_dev, struct pci_dev *pdev, |
| 9691 | struct of_device *op, const struct niu_ops *ops, | 9691 | struct platform_device *op, const struct niu_ops *ops, |
| 9692 | u8 port) | 9692 | u8 port) |
| 9693 | { | 9693 | { |
| 9694 | struct net_device *dev; | 9694 | struct net_device *dev; |
| @@ -10064,7 +10064,7 @@ static const struct niu_ops niu_phys_ops = { | |||
| 10064 | .unmap_single = niu_phys_unmap_single, | 10064 | .unmap_single = niu_phys_unmap_single, |
| 10065 | }; | 10065 | }; |
| 10066 | 10066 | ||
| 10067 | static int __devinit niu_of_probe(struct of_device *op, | 10067 | static int __devinit niu_of_probe(struct platform_device *op, |
| 10068 | const struct of_device_id *match) | 10068 | const struct of_device_id *match) |
| 10069 | { | 10069 | { |
| 10070 | union niu_parent_id parent_id; | 10070 | union niu_parent_id parent_id; |
| @@ -10179,7 +10179,7 @@ err_out: | |||
| 10179 | return err; | 10179 | return err; |
| 10180 | } | 10180 | } |
| 10181 | 10181 | ||
| 10182 | static int __devexit niu_of_remove(struct of_device *op) | 10182 | static int __devexit niu_of_remove(struct platform_device *op) |
| 10183 | { | 10183 | { |
| 10184 | struct net_device *dev = dev_get_drvdata(&op->dev); | 10184 | struct net_device *dev = dev_get_drvdata(&op->dev); |
| 10185 | 10185 | ||
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index fc5fef2a8175..f62c7b717bc8 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c | |||
| @@ -188,7 +188,7 @@ static int __devexit mdio_gpio_remove(struct platform_device *pdev) | |||
| 188 | 188 | ||
| 189 | #ifdef CONFIG_OF_GPIO | 189 | #ifdef CONFIG_OF_GPIO |
| 190 | 190 | ||
| 191 | static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, | 191 | static int __devinit mdio_ofgpio_probe(struct platform_device *ofdev, |
| 192 | const struct of_device_id *match) | 192 | const struct of_device_id *match) |
| 193 | { | 193 | { |
| 194 | struct mdio_gpio_platform_data *pdata; | 194 | struct mdio_gpio_platform_data *pdata; |
| @@ -224,7 +224,7 @@ out_free: | |||
| 224 | return -ENODEV; | 224 | return -ENODEV; |
| 225 | } | 225 | } |
| 226 | 226 | ||
| 227 | static int __devexit mdio_ofgpio_remove(struct of_device *ofdev) | 227 | static int __devexit mdio_ofgpio_remove(struct platform_device *ofdev) |
| 228 | { | 228 | { |
| 229 | mdio_gpio_bus_destroy(&ofdev->dev); | 229 | mdio_gpio_bus_destroy(&ofdev->dev); |
| 230 | kfree(ofdev->dev.platform_data); | 230 | kfree(ofdev->dev.platform_data); |
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 09c071bd6ad4..618643e3ca3e 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
| @@ -97,7 +97,7 @@ static int qec_global_reset(void __iomem *gregs) | |||
| 97 | 97 | ||
| 98 | static void qec_init(struct bigmac *bp) | 98 | static void qec_init(struct bigmac *bp) |
| 99 | { | 99 | { |
| 100 | struct of_device *qec_op = bp->qec_op; | 100 | struct platform_device *qec_op = bp->qec_op; |
| 101 | void __iomem *gregs = bp->gregs; | 101 | void __iomem *gregs = bp->gregs; |
| 102 | u8 bsizes = bp->bigmac_bursts; | 102 | u8 bsizes = bp->bigmac_bursts; |
| 103 | u32 regval; | 103 | u32 regval; |
| @@ -1083,8 +1083,8 @@ static const struct net_device_ops bigmac_ops = { | |||
| 1083 | .ndo_validate_addr = eth_validate_addr, | 1083 | .ndo_validate_addr = eth_validate_addr, |
| 1084 | }; | 1084 | }; |
| 1085 | 1085 | ||
| 1086 | static int __devinit bigmac_ether_init(struct of_device *op, | 1086 | static int __devinit bigmac_ether_init(struct platform_device *op, |
| 1087 | struct of_device *qec_op) | 1087 | struct platform_device *qec_op) |
| 1088 | { | 1088 | { |
| 1089 | static int version_printed; | 1089 | static int version_printed; |
| 1090 | struct net_device *dev; | 1090 | struct net_device *dev; |
| @@ -1242,25 +1242,25 @@ fail_and_cleanup: | |||
| 1242 | /* QEC can be the parent of either QuadEthernet or a BigMAC. We want | 1242 | /* QEC can be the parent of either QuadEthernet or a BigMAC. We want |
| 1243 | * the latter. | 1243 | * the latter. |
| 1244 | */ | 1244 | */ |
| 1245 | static int __devinit bigmac_sbus_probe(struct of_device *op, | 1245 | static int __devinit bigmac_sbus_probe(struct platform_device *op, |
| 1246 | const struct of_device_id *match) | 1246 | const struct of_device_id *match) |
| 1247 | { | 1247 | { |
| 1248 | struct device *parent = op->dev.parent; | 1248 | struct device *parent = op->dev.parent; |
| 1249 | struct of_device *qec_op; | 1249 | struct platform_device *qec_op; |
| 1250 | 1250 | ||
| 1251 | qec_op = to_of_device(parent); | 1251 | qec_op = to_platform_device(parent); |
| 1252 | 1252 | ||
| 1253 | return bigmac_ether_init(op, qec_op); | 1253 | return bigmac_ether_init(op, qec_op); |
| 1254 | } | 1254 | } |
| 1255 | 1255 | ||
| 1256 | static int __devexit bigmac_sbus_remove(struct of_device *op) | 1256 | static int __devexit bigmac_sbus_remove(struct platform_device *op) |
| 1257 | { | 1257 | { |
| 1258 | struct bigmac *bp = dev_get_drvdata(&op->dev); | 1258 | struct bigmac *bp = dev_get_drvdata(&op->dev); |
| 1259 | struct device *parent = op->dev.parent; | 1259 | struct device *parent = op->dev.parent; |
| 1260 | struct net_device *net_dev = bp->dev; | 1260 | struct net_device *net_dev = bp->dev; |
| 1261 | struct of_device *qec_op; | 1261 | struct platform_device *qec_op; |
| 1262 | 1262 | ||
| 1263 | qec_op = to_of_device(parent); | 1263 | qec_op = to_platform_device(parent); |
| 1264 | 1264 | ||
| 1265 | unregister_netdev(net_dev); | 1265 | unregister_netdev(net_dev); |
| 1266 | 1266 | ||
diff --git a/drivers/net/sunbmac.h b/drivers/net/sunbmac.h index 8840bc0b840b..8db88945b889 100644 --- a/drivers/net/sunbmac.h +++ b/drivers/net/sunbmac.h | |||
| @@ -329,8 +329,8 @@ struct bigmac { | |||
| 329 | unsigned int timer_ticks; | 329 | unsigned int timer_ticks; |
| 330 | 330 | ||
| 331 | struct net_device_stats enet_stats; | 331 | struct net_device_stats enet_stats; |
| 332 | struct of_device *qec_op; | 332 | struct platform_device *qec_op; |
| 333 | struct of_device *bigmac_op; | 333 | struct platform_device *bigmac_op; |
| 334 | struct net_device *dev; | 334 | struct net_device *dev; |
| 335 | }; | 335 | }; |
| 336 | 336 | ||
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index eec443f64079..bd0df1c14955 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
| @@ -1591,7 +1591,7 @@ static int happy_meal_init(struct happy_meal *hp) | |||
| 1591 | */ | 1591 | */ |
| 1592 | #ifdef CONFIG_SBUS | 1592 | #ifdef CONFIG_SBUS |
| 1593 | if ((hp->happy_flags & HFLAG_PCI) == 0) { | 1593 | if ((hp->happy_flags & HFLAG_PCI) == 0) { |
| 1594 | struct of_device *op = hp->happy_dev; | 1594 | struct platform_device *op = hp->happy_dev; |
| 1595 | if (sbus_can_dma_64bit()) { | 1595 | if (sbus_can_dma_64bit()) { |
| 1596 | sbus_set_sbus64(&op->dev, | 1596 | sbus_set_sbus64(&op->dev, |
| 1597 | hp->happy_bursts); | 1597 | hp->happy_bursts); |
| @@ -2480,7 +2480,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info | |||
| 2480 | #ifdef CONFIG_SBUS | 2480 | #ifdef CONFIG_SBUS |
| 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 platform_device *op = hp->happy_dev; |
| 2484 | regs = of_get_property(op->dev.of_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", |
| @@ -2515,13 +2515,13 @@ static int hme_version_printed; | |||
| 2515 | * | 2515 | * |
| 2516 | * Return NULL on failure. | 2516 | * Return NULL on failure. |
| 2517 | */ | 2517 | */ |
| 2518 | static struct quattro * __devinit quattro_sbus_find(struct of_device *child) | 2518 | static struct quattro * __devinit quattro_sbus_find(struct platform_device *child) |
| 2519 | { | 2519 | { |
| 2520 | struct device *parent = child->dev.parent; | 2520 | struct device *parent = child->dev.parent; |
| 2521 | struct of_device *op; | 2521 | struct platform_device *op; |
| 2522 | struct quattro *qp; | 2522 | struct quattro *qp; |
| 2523 | 2523 | ||
| 2524 | op = to_of_device(parent); | 2524 | op = to_platform_device(parent); |
| 2525 | qp = dev_get_drvdata(&op->dev); | 2525 | qp = dev_get_drvdata(&op->dev); |
| 2526 | if (qp) | 2526 | if (qp) |
| 2527 | return qp; | 2527 | return qp; |
| @@ -2551,7 +2551,7 @@ static int __init quattro_sbus_register_irqs(void) | |||
| 2551 | struct quattro *qp; | 2551 | struct quattro *qp; |
| 2552 | 2552 | ||
| 2553 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { | 2553 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { |
| 2554 | struct of_device *op = qp->quattro_dev; | 2554 | struct platform_device *op = qp->quattro_dev; |
| 2555 | int err, qfe_slot, skip = 0; | 2555 | int err, qfe_slot, skip = 0; |
| 2556 | 2556 | ||
| 2557 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { | 2557 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { |
| @@ -2580,7 +2580,7 @@ static void quattro_sbus_free_irqs(void) | |||
| 2580 | struct quattro *qp; | 2580 | struct quattro *qp; |
| 2581 | 2581 | ||
| 2582 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { | 2582 | for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { |
| 2583 | struct of_device *op = qp->quattro_dev; | 2583 | struct platform_device *op = qp->quattro_dev; |
| 2584 | int qfe_slot, skip = 0; | 2584 | int qfe_slot, skip = 0; |
| 2585 | 2585 | ||
| 2586 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { | 2586 | for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { |
| @@ -2639,7 +2639,7 @@ static const struct net_device_ops hme_netdev_ops = { | |||
| 2639 | }; | 2639 | }; |
| 2640 | 2640 | ||
| 2641 | #ifdef CONFIG_SBUS | 2641 | #ifdef CONFIG_SBUS |
| 2642 | static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | 2642 | static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe) |
| 2643 | { | 2643 | { |
| 2644 | struct device_node *dp = op->dev.of_node, *sbus_dp; | 2644 | struct device_node *dp = op->dev.of_node, *sbus_dp; |
| 2645 | struct quattro *qp = NULL; | 2645 | struct quattro *qp = NULL; |
| @@ -2648,7 +2648,7 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | |||
| 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)->dev.of_node; | 2651 | sbus_dp = op->dev.parent->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")) |
| @@ -3235,7 +3235,7 @@ static void happy_meal_pci_exit(void) | |||
| 3235 | #endif | 3235 | #endif |
| 3236 | 3236 | ||
| 3237 | #ifdef CONFIG_SBUS | 3237 | #ifdef CONFIG_SBUS |
| 3238 | static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) | 3238 | static int __devinit hme_sbus_probe(struct platform_device *op, const struct of_device_id *match) |
| 3239 | { | 3239 | { |
| 3240 | struct device_node *dp = op->dev.of_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); |
| @@ -3247,7 +3247,7 @@ static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device | |||
| 3247 | return happy_meal_sbus_probe_one(op, is_qfe); | 3247 | return happy_meal_sbus_probe_one(op, is_qfe); |
| 3248 | } | 3248 | } |
| 3249 | 3249 | ||
| 3250 | static int __devexit hme_sbus_remove(struct of_device *op) | 3250 | static int __devexit hme_sbus_remove(struct platform_device *op) |
| 3251 | { | 3251 | { |
| 3252 | struct happy_meal *hp = dev_get_drvdata(&op->dev); | 3252 | struct happy_meal *hp = dev_get_drvdata(&op->dev); |
| 3253 | struct net_device *net_dev = hp->dev; | 3253 | struct net_device *net_dev = hp->dev; |
diff --git a/drivers/net/sunhme.h b/drivers/net/sunhme.h index efd2ca0fcad3..756b5bf3aa89 100644 --- a/drivers/net/sunhme.h +++ b/drivers/net/sunhme.h | |||
| @@ -407,7 +407,7 @@ struct happy_meal { | |||
| 407 | void (*write_rxd)(struct happy_meal_rxd *, u32, u32); | 407 | void (*write_rxd)(struct happy_meal_rxd *, u32, u32); |
| 408 | #endif | 408 | #endif |
| 409 | 409 | ||
| 410 | /* This is either an of_device or a pci_dev. */ | 410 | /* This is either an platform_device or a pci_dev. */ |
| 411 | void *happy_dev; | 411 | void *happy_dev; |
| 412 | struct device *dma_dev; | 412 | struct device *dma_dev; |
| 413 | 413 | ||
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index ee364fa75634..8dcb858f2168 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
| @@ -250,7 +250,7 @@ struct lance_private { | |||
| 250 | int rx_new, tx_new; | 250 | int rx_new, tx_new; |
| 251 | int rx_old, tx_old; | 251 | int rx_old, tx_old; |
| 252 | 252 | ||
| 253 | struct of_device *ledma; /* If set this points to ledma */ | 253 | struct platform_device *ledma; /* If set this points to ledma */ |
| 254 | char tpe; /* cable-selection is TPE */ | 254 | char tpe; /* cable-selection is TPE */ |
| 255 | char auto_select; /* cable-selection by carrier */ | 255 | char auto_select; /* cable-selection by carrier */ |
| 256 | char burst_sizes; /* ledma SBus burst sizes */ | 256 | char burst_sizes; /* ledma SBus burst sizes */ |
| @@ -265,8 +265,8 @@ struct lance_private { | |||
| 265 | char *name; | 265 | char *name; |
| 266 | dma_addr_t init_block_dvma; | 266 | dma_addr_t init_block_dvma; |
| 267 | struct net_device *dev; /* Backpointer */ | 267 | struct net_device *dev; /* Backpointer */ |
| 268 | struct of_device *op; | 268 | struct platform_device *op; |
| 269 | struct of_device *lebuffer; | 269 | struct platform_device *lebuffer; |
| 270 | struct timer_list multicast_timer; | 270 | struct timer_list multicast_timer; |
| 271 | }; | 271 | }; |
| 272 | 272 | ||
| @@ -1272,7 +1272,7 @@ static void lance_free_hwresources(struct lance_private *lp) | |||
| 1272 | if (lp->lregs) | 1272 | if (lp->lregs) |
| 1273 | of_iounmap(&lp->op->resource[0], lp->lregs, LANCE_REG_SIZE); | 1273 | of_iounmap(&lp->op->resource[0], lp->lregs, LANCE_REG_SIZE); |
| 1274 | if (lp->dregs) { | 1274 | if (lp->dregs) { |
| 1275 | struct of_device *ledma = lp->ledma; | 1275 | struct platform_device *ledma = lp->ledma; |
| 1276 | 1276 | ||
| 1277 | of_iounmap(&ledma->resource[0], lp->dregs, | 1277 | of_iounmap(&ledma->resource[0], lp->dregs, |
| 1278 | resource_size(&ledma->resource[0])); | 1278 | resource_size(&ledma->resource[0])); |
| @@ -1319,9 +1319,9 @@ static const struct net_device_ops sparc_lance_ops = { | |||
| 1319 | .ndo_validate_addr = eth_validate_addr, | 1319 | .ndo_validate_addr = eth_validate_addr, |
| 1320 | }; | 1320 | }; |
| 1321 | 1321 | ||
| 1322 | static int __devinit sparc_lance_probe_one(struct of_device *op, | 1322 | static int __devinit sparc_lance_probe_one(struct platform_device *op, |
| 1323 | struct of_device *ledma, | 1323 | struct platform_device *ledma, |
| 1324 | struct of_device *lebuffer) | 1324 | struct platform_device *lebuffer) |
| 1325 | { | 1325 | { |
| 1326 | struct device_node *dp = op->dev.of_node; | 1326 | struct device_node *dp = op->dev.of_node; |
| 1327 | static unsigned version_printed; | 1327 | static unsigned version_printed; |
| @@ -1503,9 +1503,9 @@ fail: | |||
| 1503 | return -ENODEV; | 1503 | return -ENODEV; |
| 1504 | } | 1504 | } |
| 1505 | 1505 | ||
| 1506 | static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) | 1506 | static int __devinit sunlance_sbus_probe(struct platform_device *op, const struct of_device_id *match) |
| 1507 | { | 1507 | { |
| 1508 | struct of_device *parent = to_of_device(op->dev.parent); | 1508 | struct platform_device *parent = to_platform_device(op->dev.parent); |
| 1509 | struct device_node *parent_dp = parent->dev.of_node; | 1509 | struct device_node *parent_dp = parent->dev.of_node; |
| 1510 | int err; | 1510 | int err; |
| 1511 | 1511 | ||
| @@ -1519,7 +1519,7 @@ static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_d | |||
| 1519 | return err; | 1519 | return err; |
| 1520 | } | 1520 | } |
| 1521 | 1521 | ||
| 1522 | static int __devexit sunlance_sbus_remove(struct of_device *op) | 1522 | static int __devexit sunlance_sbus_remove(struct platform_device *op) |
| 1523 | { | 1523 | { |
| 1524 | struct lance_private *lp = dev_get_drvdata(&op->dev); | 1524 | struct lance_private *lp = dev_get_drvdata(&op->dev); |
| 1525 | struct net_device *net_dev = lp->dev; | 1525 | struct net_device *net_dev = lp->dev; |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 5f84a5dadedd..72e65d4666ef 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
| @@ -689,7 +689,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | |||
| 689 | { | 689 | { |
| 690 | const struct linux_prom_registers *regs; | 690 | const struct linux_prom_registers *regs; |
| 691 | struct sunqe *qep = netdev_priv(dev); | 691 | struct sunqe *qep = netdev_priv(dev); |
| 692 | struct of_device *op; | 692 | struct platform_device *op; |
| 693 | 693 | ||
| 694 | strcpy(info->driver, "sunqe"); | 694 | strcpy(info->driver, "sunqe"); |
| 695 | strcpy(info->version, "3.0"); | 695 | strcpy(info->version, "3.0"); |
| @@ -720,7 +720,7 @@ static const struct ethtool_ops qe_ethtool_ops = { | |||
| 720 | }; | 720 | }; |
| 721 | 721 | ||
| 722 | /* This is only called once at boot time for each card probed. */ | 722 | /* This is only called once at boot time for each card probed. */ |
| 723 | static void qec_init_once(struct sunqec *qecp, struct of_device *op) | 723 | static void qec_init_once(struct sunqec *qecp, struct platform_device *op) |
| 724 | { | 724 | { |
| 725 | u8 bsizes = qecp->qec_bursts; | 725 | u8 bsizes = qecp->qec_bursts; |
| 726 | 726 | ||
| @@ -770,9 +770,9 @@ static u8 __devinit qec_get_burst(struct device_node *dp) | |||
| 770 | return bsizes; | 770 | return bsizes; |
| 771 | } | 771 | } |
| 772 | 772 | ||
| 773 | static struct sunqec * __devinit get_qec(struct of_device *child) | 773 | static struct sunqec * __devinit get_qec(struct platform_device *child) |
| 774 | { | 774 | { |
| 775 | struct of_device *op = to_of_device(child->dev.parent); | 775 | struct platform_device *op = to_platform_device(child->dev.parent); |
| 776 | struct sunqec *qecp; | 776 | struct sunqec *qecp; |
| 777 | 777 | ||
| 778 | qecp = dev_get_drvdata(&op->dev); | 778 | qecp = dev_get_drvdata(&op->dev); |
| @@ -836,7 +836,7 @@ static const struct net_device_ops qec_ops = { | |||
| 836 | .ndo_validate_addr = eth_validate_addr, | 836 | .ndo_validate_addr = eth_validate_addr, |
| 837 | }; | 837 | }; |
| 838 | 838 | ||
| 839 | static int __devinit qec_ether_init(struct of_device *op) | 839 | static int __devinit qec_ether_init(struct platform_device *op) |
| 840 | { | 840 | { |
| 841 | static unsigned version_printed; | 841 | static unsigned version_printed; |
| 842 | struct net_device *dev; | 842 | struct net_device *dev; |
| @@ -941,12 +941,12 @@ fail: | |||
| 941 | return res; | 941 | return res; |
| 942 | } | 942 | } |
| 943 | 943 | ||
| 944 | static int __devinit qec_sbus_probe(struct of_device *op, const struct of_device_id *match) | 944 | static int __devinit qec_sbus_probe(struct platform_device *op, const struct of_device_id *match) |
| 945 | { | 945 | { |
| 946 | return qec_ether_init(op); | 946 | return qec_ether_init(op); |
| 947 | } | 947 | } |
| 948 | 948 | ||
| 949 | static int __devexit qec_sbus_remove(struct of_device *op) | 949 | static int __devexit qec_sbus_remove(struct platform_device *op) |
| 950 | { | 950 | { |
| 951 | struct sunqe *qp = dev_get_drvdata(&op->dev); | 951 | struct sunqe *qp = dev_get_drvdata(&op->dev); |
| 952 | struct net_device *net_dev = qp->dev; | 952 | struct net_device *net_dev = qp->dev; |
| @@ -997,7 +997,7 @@ static void __exit qec_exit(void) | |||
| 997 | 997 | ||
| 998 | while (root_qec_dev) { | 998 | while (root_qec_dev) { |
| 999 | struct sunqec *next = root_qec_dev->next_module; | 999 | struct sunqec *next = root_qec_dev->next_module; |
| 1000 | struct of_device *op = root_qec_dev->op; | 1000 | struct platform_device *op = root_qec_dev->op; |
| 1001 | 1001 | ||
| 1002 | free_irq(op->archdata.irqs[0], (void *) root_qec_dev); | 1002 | free_irq(op->archdata.irqs[0], (void *) root_qec_dev); |
| 1003 | of_iounmap(&op->resource[0], root_qec_dev->gregs, | 1003 | of_iounmap(&op->resource[0], root_qec_dev->gregs, |
diff --git a/drivers/net/sunqe.h b/drivers/net/sunqe.h index 5813a7b2faa5..581781b6b2fa 100644 --- a/drivers/net/sunqe.h +++ b/drivers/net/sunqe.h | |||
| @@ -314,7 +314,7 @@ struct sunqec { | |||
| 314 | void __iomem *gregs; /* QEC Global Registers */ | 314 | void __iomem *gregs; /* QEC Global Registers */ |
| 315 | struct sunqe *qes[4]; /* Each child MACE */ | 315 | struct sunqe *qes[4]; /* Each child MACE */ |
| 316 | unsigned int qec_bursts; /* Support burst sizes */ | 316 | unsigned int qec_bursts; /* Support burst sizes */ |
| 317 | struct of_device *op; /* QEC's OF device */ | 317 | struct platform_device *op; /* QEC's OF device */ |
| 318 | struct sunqec *next_module; /* List of all QECs in system */ | 318 | struct sunqec *next_module; /* List of all QECs in system */ |
| 319 | }; | 319 | }; |
| 320 | 320 | ||
| @@ -342,7 +342,7 @@ struct sunqe { | |||
| 342 | __u32 buffers_dvma; /* DVMA visible address. */ | 342 | __u32 buffers_dvma; /* DVMA visible address. */ |
| 343 | struct sunqec *parent; | 343 | struct sunqec *parent; |
| 344 | u8 mconfig; /* Base MACE mconfig value */ | 344 | u8 mconfig; /* Base MACE mconfig value */ |
| 345 | struct of_device *op; /* QE's OF device struct */ | 345 | struct platform_device *op; /* QE's OF device struct */ |
| 346 | struct net_device *dev; /* QE's netdevice struct */ | 346 | struct net_device *dev; /* QE's netdevice struct */ |
| 347 | int channel; /* Who am I? */ | 347 | int channel; /* Who am I? */ |
| 348 | }; | 348 | }; |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 8d532f9b50d0..a4c3f5708246 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
| @@ -3601,7 +3601,7 @@ static void ucc_geth_timeout(struct net_device *dev) | |||
| 3601 | 3601 | ||
| 3602 | #ifdef CONFIG_PM | 3602 | #ifdef CONFIG_PM |
| 3603 | 3603 | ||
| 3604 | static int ucc_geth_suspend(struct of_device *ofdev, pm_message_t state) | 3604 | static int ucc_geth_suspend(struct platform_device *ofdev, pm_message_t state) |
| 3605 | { | 3605 | { |
| 3606 | struct net_device *ndev = dev_get_drvdata(&ofdev->dev); | 3606 | struct net_device *ndev = dev_get_drvdata(&ofdev->dev); |
| 3607 | struct ucc_geth_private *ugeth = netdev_priv(ndev); | 3607 | struct ucc_geth_private *ugeth = netdev_priv(ndev); |
| @@ -3629,7 +3629,7 @@ static int ucc_geth_suspend(struct of_device *ofdev, pm_message_t state) | |||
| 3629 | return 0; | 3629 | return 0; |
| 3630 | } | 3630 | } |
| 3631 | 3631 | ||
| 3632 | static int ucc_geth_resume(struct of_device *ofdev) | 3632 | static int ucc_geth_resume(struct platform_device *ofdev) |
| 3633 | { | 3633 | { |
| 3634 | struct net_device *ndev = dev_get_drvdata(&ofdev->dev); | 3634 | struct net_device *ndev = dev_get_drvdata(&ofdev->dev); |
| 3635 | struct ucc_geth_private *ugeth = netdev_priv(ndev); | 3635 | struct ucc_geth_private *ugeth = netdev_priv(ndev); |
| @@ -3732,7 +3732,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = { | |||
| 3732 | #endif | 3732 | #endif |
| 3733 | }; | 3733 | }; |
| 3734 | 3734 | ||
| 3735 | static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) | 3735 | static int ucc_geth_probe(struct platform_device* ofdev, const struct of_device_id *match) |
| 3736 | { | 3736 | { |
| 3737 | struct device *device = &ofdev->dev; | 3737 | struct device *device = &ofdev->dev; |
| 3738 | struct device_node *np = ofdev->dev.of_node; | 3738 | struct device_node *np = ofdev->dev.of_node; |
| @@ -3954,7 +3954,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
| 3954 | return 0; | 3954 | return 0; |
| 3955 | } | 3955 | } |
| 3956 | 3956 | ||
| 3957 | static int ucc_geth_remove(struct of_device* ofdev) | 3957 | static int ucc_geth_remove(struct platform_device* ofdev) |
| 3958 | { | 3958 | { |
| 3959 | struct device *device = &ofdev->dev; | 3959 | struct device *device = &ofdev->dev; |
| 3960 | struct net_device *dev = dev_get_drvdata(device); | 3960 | struct net_device *dev = dev_get_drvdata(device); |
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index b2c2f391b29d..ecbbb688eba0 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c | |||
| @@ -1086,7 +1086,7 @@ static void xemaclite_remove_ndev(struct net_device *ndev) | |||
| 1086 | * | 1086 | * |
| 1087 | * Return: Value of the parameter if the parameter is found, or 0 otherwise | 1087 | * Return: Value of the parameter if the parameter is found, or 0 otherwise |
| 1088 | */ | 1088 | */ |
| 1089 | static bool get_bool(struct of_device *ofdev, const char *s) | 1089 | static bool get_bool(struct platform_device *ofdev, const char *s) |
| 1090 | { | 1090 | { |
| 1091 | u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL); | 1091 | u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL); |
| 1092 | 1092 | ||
| @@ -1115,7 +1115,7 @@ static struct net_device_ops xemaclite_netdev_ops; | |||
| 1115 | * Return: 0, if the driver is bound to the Emaclite device, or | 1115 | * Return: 0, if the driver is bound to the Emaclite device, or |
| 1116 | * a negative error if there is failure. | 1116 | * a negative error if there is failure. |
| 1117 | */ | 1117 | */ |
| 1118 | static int __devinit xemaclite_of_probe(struct of_device *ofdev, | 1118 | static int __devinit xemaclite_of_probe(struct platform_device *ofdev, |
| 1119 | const struct of_device_id *match) | 1119 | const struct of_device_id *match) |
| 1120 | { | 1120 | { |
| 1121 | struct resource r_irq; /* Interrupt resources */ | 1121 | struct resource r_irq; /* Interrupt resources */ |
| @@ -1240,7 +1240,7 @@ error2: | |||
| 1240 | * | 1240 | * |
| 1241 | * Return: 0, always. | 1241 | * Return: 0, always. |
| 1242 | */ | 1242 | */ |
| 1243 | static int __devexit xemaclite_of_remove(struct of_device *of_dev) | 1243 | static int __devexit xemaclite_of_remove(struct platform_device *of_dev) |
| 1244 | { | 1244 | { |
| 1245 | struct device *dev = &of_dev->dev; | 1245 | struct device *dev = &of_dev->dev; |
| 1246 | struct net_device *ndev = dev_get_drvdata(dev); | 1246 | struct net_device *ndev = dev_get_drvdata(dev); |
