diff options
Diffstat (limited to 'drivers/net/ibm_newemac')
| -rw-r--r-- | drivers/net/ibm_newemac/core.c | 6 | ||||
| -rw-r--r-- | drivers/net/ibm_newemac/core.h | 12 | ||||
| -rw-r--r-- | drivers/net/ibm_newemac/mal.c | 4 | ||||
| -rw-r--r-- | drivers/net/ibm_newemac/mal.h | 2 | ||||
| -rw-r--r-- | drivers/net/ibm_newemac/rgmii.c | 18 | ||||
| -rw-r--r-- | drivers/net/ibm_newemac/rgmii.h | 16 | ||||
| -rw-r--r-- | drivers/net/ibm_newemac/tah.c | 14 | ||||
| -rw-r--r-- | drivers/net/ibm_newemac/tah.h | 12 | ||||
| -rw-r--r-- | drivers/net/ibm_newemac/zmii.c | 18 | ||||
| -rw-r--r-- | drivers/net/ibm_newemac/zmii.h | 16 |
10 files changed, 59 insertions, 59 deletions
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 |
