aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ibm_newemac/zmii.c
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-08-06 11:25:50 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-08-06 11:25:50 -0400
commit2dc11581376829303b98eadb2de253bee065a56a (patch)
treedbce62559c822cd720d1819a50c488bfecdfa945 /drivers/net/ibm_newemac/zmii.c
parentfc1caf6eafb30ea185720e29f7f5eccca61ecd60 (diff)
of/device: Replace struct of_device with struct platform_device
of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ibm_newemac/zmii.c')
-rw-r--r--drivers/net/ibm_newemac/zmii.c18
1 files changed, 9 insertions, 9 deletions
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
85int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode) 85int __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
151void zmii_get_mdio(struct of_device *ofdev, int input) 151void 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
164void zmii_put_mdio(struct of_device *ofdev, int input) 164void 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
173void zmii_set_speed(struct of_device *ofdev, int input, int speed) 173void 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
194void zmii_detach(struct of_device *ofdev, int input) 194void 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
213int zmii_get_regs_len(struct of_device *ofdev) 213int 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
219void *zmii_dump_regs(struct of_device *ofdev, void *buf) 219void *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
234static int __devinit zmii_probe(struct of_device *ofdev, 234static 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
289static int __devexit zmii_remove(struct of_device *ofdev) 289static 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