diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-08-06 11:25:50 -0400 |
commit | 2dc11581376829303b98eadb2de253bee065a56a (patch) | |
tree | dbce62559c822cd720d1819a50c488bfecdfa945 /drivers/net/fs_enet | |
parent | fc1caf6eafb30ea185720e29f7f5eccca61ecd60 (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/fs_enet')
-rw-r--r-- | drivers/net/fs_enet/fs_enet-main.c | 4 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-fcc.c | 2 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-fec.c | 2 | ||||
-rw-r--r-- | drivers/net/fs_enet/mac-scc.c | 2 | ||||
-rw-r--r-- | drivers/net/fs_enet/mii-bitbang.c | 4 | ||||
-rw-r--r-- | drivers/net/fs_enet/mii-fec.c | 4 |
6 files changed, 9 insertions, 9 deletions
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; |