diff options
26 files changed, 123 insertions, 128 deletions
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index 312b9c8f4f3b..c0a1bc5b1435 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c | |||
@@ -247,10 +247,9 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, | |||
247 | } | 247 | } |
248 | #endif /* CONFIG_PPC_MPC512x */ | 248 | #endif /* CONFIG_PPC_MPC512x */ |
249 | 249 | ||
250 | static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev, | 250 | static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) |
251 | const struct of_device_id *id) | ||
252 | { | 251 | { |
253 | struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; | 252 | struct mpc5xxx_can_data *data; |
254 | struct device_node *np = ofdev->dev.of_node; | 253 | struct device_node *np = ofdev->dev.of_node; |
255 | struct net_device *dev; | 254 | struct net_device *dev; |
256 | struct mscan_priv *priv; | 255 | struct mscan_priv *priv; |
@@ -259,6 +258,10 @@ static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev, | |||
259 | int irq, mscan_clksrc = 0; | 258 | int irq, mscan_clksrc = 0; |
260 | int err = -ENOMEM; | 259 | int err = -ENOMEM; |
261 | 260 | ||
261 | if (!ofdev->dev.of_match) | ||
262 | return -EINVAL; | ||
263 | data = (struct mpc5xxx_can_data *)of_dev->dev.of_match->data; | ||
264 | |||
262 | base = of_iomap(np, 0); | 265 | base = of_iomap(np, 0); |
263 | if (!base) { | 266 | if (!base) { |
264 | dev_err(&ofdev->dev, "couldn't ioremap\n"); | 267 | dev_err(&ofdev->dev, "couldn't ioremap\n"); |
@@ -391,7 +394,7 @@ static struct of_device_id __devinitdata mpc5xxx_can_table[] = { | |||
391 | {}, | 394 | {}, |
392 | }; | 395 | }; |
393 | 396 | ||
394 | static struct of_platform_driver mpc5xxx_can_driver = { | 397 | static struct platform_driver mpc5xxx_can_driver = { |
395 | .driver = { | 398 | .driver = { |
396 | .name = "mpc5xxx_can", | 399 | .name = "mpc5xxx_can", |
397 | .owner = THIS_MODULE, | 400 | .owner = THIS_MODULE, |
@@ -407,13 +410,13 @@ static struct of_platform_driver mpc5xxx_can_driver = { | |||
407 | 410 | ||
408 | static int __init mpc5xxx_can_init(void) | 411 | static int __init mpc5xxx_can_init(void) |
409 | { | 412 | { |
410 | return of_register_platform_driver(&mpc5xxx_can_driver); | 413 | return platform_driver_register(&mpc5xxx_can_driver); |
411 | } | 414 | } |
412 | module_init(mpc5xxx_can_init); | 415 | module_init(mpc5xxx_can_init); |
413 | 416 | ||
414 | static void __exit mpc5xxx_can_exit(void) | 417 | static void __exit mpc5xxx_can_exit(void) |
415 | { | 418 | { |
416 | return of_unregister_platform_driver(&mpc5xxx_can_driver); | 419 | platform_driver_unregister(&mpc5xxx_can_driver); |
417 | }; | 420 | }; |
418 | module_exit(mpc5xxx_can_exit); | 421 | module_exit(mpc5xxx_can_exit); |
419 | 422 | ||
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index 09c3e9db9316..9793df6e3455 100644 --- a/drivers/net/can/sja1000/sja1000_of_platform.c +++ b/drivers/net/can/sja1000/sja1000_of_platform.c | |||
@@ -87,8 +87,7 @@ static int __devexit sja1000_ofp_remove(struct platform_device *ofdev) | |||
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | 89 | ||
90 | static int __devinit sja1000_ofp_probe(struct platform_device *ofdev, | 90 | static int __devinit sja1000_ofp_probe(struct platform_device *ofdev) |
91 | const struct of_device_id *id) | ||
92 | { | 91 | { |
93 | struct device_node *np = ofdev->dev.of_node; | 92 | struct device_node *np = ofdev->dev.of_node; |
94 | struct net_device *dev; | 93 | struct net_device *dev; |
@@ -210,7 +209,7 @@ static struct of_device_id __devinitdata sja1000_ofp_table[] = { | |||
210 | }; | 209 | }; |
211 | MODULE_DEVICE_TABLE(of, sja1000_ofp_table); | 210 | MODULE_DEVICE_TABLE(of, sja1000_ofp_table); |
212 | 211 | ||
213 | static struct of_platform_driver sja1000_ofp_driver = { | 212 | static struct platform_driver sja1000_ofp_driver = { |
214 | .driver = { | 213 | .driver = { |
215 | .owner = THIS_MODULE, | 214 | .owner = THIS_MODULE, |
216 | .name = DRV_NAME, | 215 | .name = DRV_NAME, |
@@ -222,12 +221,12 @@ static struct of_platform_driver sja1000_ofp_driver = { | |||
222 | 221 | ||
223 | static int __init sja1000_ofp_init(void) | 222 | static int __init sja1000_ofp_init(void) |
224 | { | 223 | { |
225 | return of_register_platform_driver(&sja1000_ofp_driver); | 224 | return platform_driver_register(&sja1000_ofp_driver); |
226 | } | 225 | } |
227 | module_init(sja1000_ofp_init); | 226 | module_init(sja1000_ofp_init); |
228 | 227 | ||
229 | static void __exit sja1000_ofp_exit(void) | 228 | static void __exit sja1000_ofp_exit(void) |
230 | { | 229 | { |
231 | return of_unregister_platform_driver(&sja1000_ofp_driver); | 230 | return platform_driver_unregister(&sja1000_ofp_driver); |
232 | }; | 231 | }; |
233 | module_exit(sja1000_ofp_exit); | 232 | module_exit(sja1000_ofp_exit); |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 50c1213f61fe..9f81b1ac130e 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -840,8 +840,7 @@ static const struct net_device_ops mpc52xx_fec_netdev_ops = { | |||
840 | /* OF Driver */ | 840 | /* OF Driver */ |
841 | /* ======================================================================== */ | 841 | /* ======================================================================== */ |
842 | 842 | ||
843 | static int __devinit | 843 | static int __devinit mpc52xx_fec_probe(struct platform_device *op) |
844 | mpc52xx_fec_probe(struct platform_device *op, const struct of_device_id *match) | ||
845 | { | 844 | { |
846 | int rv; | 845 | int rv; |
847 | struct net_device *ndev; | 846 | struct net_device *ndev; |
@@ -1049,7 +1048,7 @@ static struct of_device_id mpc52xx_fec_match[] = { | |||
1049 | 1048 | ||
1050 | MODULE_DEVICE_TABLE(of, mpc52xx_fec_match); | 1049 | MODULE_DEVICE_TABLE(of, mpc52xx_fec_match); |
1051 | 1050 | ||
1052 | static struct of_platform_driver mpc52xx_fec_driver = { | 1051 | static struct platform_driver mpc52xx_fec_driver = { |
1053 | .driver = { | 1052 | .driver = { |
1054 | .name = DRIVER_NAME, | 1053 | .name = DRIVER_NAME, |
1055 | .owner = THIS_MODULE, | 1054 | .owner = THIS_MODULE, |
@@ -1073,21 +1072,21 @@ mpc52xx_fec_init(void) | |||
1073 | { | 1072 | { |
1074 | #ifdef CONFIG_FEC_MPC52xx_MDIO | 1073 | #ifdef CONFIG_FEC_MPC52xx_MDIO |
1075 | int ret; | 1074 | int ret; |
1076 | ret = of_register_platform_driver(&mpc52xx_fec_mdio_driver); | 1075 | ret = platform_driver_register(&mpc52xx_fec_mdio_driver); |
1077 | if (ret) { | 1076 | if (ret) { |
1078 | printk(KERN_ERR DRIVER_NAME ": failed to register mdio driver\n"); | 1077 | printk(KERN_ERR DRIVER_NAME ": failed to register mdio driver\n"); |
1079 | return ret; | 1078 | return ret; |
1080 | } | 1079 | } |
1081 | #endif | 1080 | #endif |
1082 | return of_register_platform_driver(&mpc52xx_fec_driver); | 1081 | return platform_driver_register(&mpc52xx_fec_driver); |
1083 | } | 1082 | } |
1084 | 1083 | ||
1085 | static void __exit | 1084 | static void __exit |
1086 | mpc52xx_fec_exit(void) | 1085 | mpc52xx_fec_exit(void) |
1087 | { | 1086 | { |
1088 | of_unregister_platform_driver(&mpc52xx_fec_driver); | 1087 | platform_driver_unregister(&mpc52xx_fec_driver); |
1089 | #ifdef CONFIG_FEC_MPC52xx_MDIO | 1088 | #ifdef CONFIG_FEC_MPC52xx_MDIO |
1090 | of_unregister_platform_driver(&mpc52xx_fec_mdio_driver); | 1089 | platform_driver_unregister(&mpc52xx_fec_mdio_driver); |
1091 | #endif | 1090 | #endif |
1092 | } | 1091 | } |
1093 | 1092 | ||
diff --git a/drivers/net/fec_mpc52xx.h b/drivers/net/fec_mpc52xx.h index a227a525bdbb..41d2dffde55b 100644 --- a/drivers/net/fec_mpc52xx.h +++ b/drivers/net/fec_mpc52xx.h | |||
@@ -289,6 +289,6 @@ struct mpc52xx_fec { | |||
289 | #define FEC_XMIT_FSM_ENABLE_CRC 0x01000000 | 289 | #define FEC_XMIT_FSM_ENABLE_CRC 0x01000000 |
290 | 290 | ||
291 | 291 | ||
292 | extern struct of_platform_driver mpc52xx_fec_mdio_driver; | 292 | extern struct platform_driver mpc52xx_fec_mdio_driver; |
293 | 293 | ||
294 | #endif /* __DRIVERS_NET_MPC52XX_FEC_H__ */ | 294 | #endif /* __DRIVERS_NET_MPC52XX_FEC_H__ */ |
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c index 0b4cb6f15984..360a578c2bb7 100644 --- a/drivers/net/fec_mpc52xx_phy.c +++ b/drivers/net/fec_mpc52xx_phy.c | |||
@@ -61,8 +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 platform_device *of, | 64 | static int mpc52xx_fec_mdio_probe(struct platform_device *of) |
65 | const struct of_device_id *match) | ||
66 | { | 65 | { |
67 | struct device *dev = &of->dev; | 66 | struct device *dev = &of->dev; |
68 | struct device_node *np = of->dev.of_node; | 67 | struct device_node *np = of->dev.of_node; |
@@ -145,7 +144,7 @@ static struct of_device_id mpc52xx_fec_mdio_match[] = { | |||
145 | }; | 144 | }; |
146 | MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match); | 145 | MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match); |
147 | 146 | ||
148 | struct of_platform_driver mpc52xx_fec_mdio_driver = { | 147 | struct platform_driver mpc52xx_fec_mdio_driver = { |
149 | .driver = { | 148 | .driver = { |
150 | .name = "mpc5200b-fec-phy", | 149 | .name = "mpc5200b-fec-phy", |
151 | .owner = THIS_MODULE, | 150 | .owner = THIS_MODULE, |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 7a1f3d0ffa78..24cb953900dd 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -998,8 +998,7 @@ static const struct net_device_ops fs_enet_netdev_ops = { | |||
998 | #endif | 998 | #endif |
999 | }; | 999 | }; |
1000 | 1000 | ||
1001 | static int __devinit fs_enet_probe(struct platform_device *ofdev, | 1001 | static int __devinit fs_enet_probe(struct platform_device *ofdev) |
1002 | const struct of_device_id *match) | ||
1003 | { | 1002 | { |
1004 | struct net_device *ndev; | 1003 | struct net_device *ndev; |
1005 | struct fs_enet_private *fep; | 1004 | struct fs_enet_private *fep; |
@@ -1008,11 +1007,14 @@ static int __devinit fs_enet_probe(struct platform_device *ofdev, | |||
1008 | const u8 *mac_addr; | 1007 | const u8 *mac_addr; |
1009 | int privsize, len, ret = -ENODEV; | 1008 | int privsize, len, ret = -ENODEV; |
1010 | 1009 | ||
1010 | if (!ofdev->dev.of_match) | ||
1011 | return -EINVAL; | ||
1012 | |||
1011 | fpi = kzalloc(sizeof(*fpi), GFP_KERNEL); | 1013 | fpi = kzalloc(sizeof(*fpi), GFP_KERNEL); |
1012 | if (!fpi) | 1014 | if (!fpi) |
1013 | return -ENOMEM; | 1015 | return -ENOMEM; |
1014 | 1016 | ||
1015 | if (!IS_FEC(match)) { | 1017 | if (!IS_FEC(ofdev->dev.of_match)) { |
1016 | data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); | 1018 | data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); |
1017 | if (!data || len != 4) | 1019 | if (!data || len != 4) |
1018 | goto out_free_fpi; | 1020 | goto out_free_fpi; |
@@ -1047,7 +1049,7 @@ static int __devinit fs_enet_probe(struct platform_device *ofdev, | |||
1047 | fep->dev = &ofdev->dev; | 1049 | fep->dev = &ofdev->dev; |
1048 | fep->ndev = ndev; | 1050 | fep->ndev = ndev; |
1049 | fep->fpi = fpi; | 1051 | fep->fpi = fpi; |
1050 | fep->ops = match->data; | 1052 | fep->ops = ofdev->dev.of_match->data; |
1051 | 1053 | ||
1052 | ret = fep->ops->setup_data(ndev); | 1054 | ret = fep->ops->setup_data(ndev); |
1053 | if (ret) | 1055 | if (ret) |
@@ -1156,7 +1158,7 @@ static struct of_device_id fs_enet_match[] = { | |||
1156 | }; | 1158 | }; |
1157 | MODULE_DEVICE_TABLE(of, fs_enet_match); | 1159 | MODULE_DEVICE_TABLE(of, fs_enet_match); |
1158 | 1160 | ||
1159 | static struct of_platform_driver fs_enet_driver = { | 1161 | static struct platform_driver fs_enet_driver = { |
1160 | .driver = { | 1162 | .driver = { |
1161 | .owner = THIS_MODULE, | 1163 | .owner = THIS_MODULE, |
1162 | .name = "fs_enet", | 1164 | .name = "fs_enet", |
@@ -1168,12 +1170,12 @@ static struct of_platform_driver fs_enet_driver = { | |||
1168 | 1170 | ||
1169 | static int __init fs_init(void) | 1171 | static int __init fs_init(void) |
1170 | { | 1172 | { |
1171 | return of_register_platform_driver(&fs_enet_driver); | 1173 | return platform_driver_register(&fs_enet_driver); |
1172 | } | 1174 | } |
1173 | 1175 | ||
1174 | static void __exit fs_cleanup(void) | 1176 | static void __exit fs_cleanup(void) |
1175 | { | 1177 | { |
1176 | of_unregister_platform_driver(&fs_enet_driver); | 1178 | platform_driver_unregister(&fs_enet_driver); |
1177 | } | 1179 | } |
1178 | 1180 | ||
1179 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1181 | #ifdef CONFIG_NET_POLL_CONTROLLER |
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c index 3cda2b515471..ad2975440719 100644 --- a/drivers/net/fs_enet/mii-bitbang.c +++ b/drivers/net/fs_enet/mii-bitbang.c | |||
@@ -150,8 +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 platform_device *ofdev, | 153 | static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev) |
154 | const struct of_device_id *match) | ||
155 | { | 154 | { |
156 | struct mii_bus *new_bus; | 155 | struct mii_bus *new_bus; |
157 | struct bb_info *bitbang; | 156 | struct bb_info *bitbang; |
@@ -223,7 +222,7 @@ static struct of_device_id fs_enet_mdio_bb_match[] = { | |||
223 | }; | 222 | }; |
224 | MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match); | 223 | MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match); |
225 | 224 | ||
226 | static struct of_platform_driver fs_enet_bb_mdio_driver = { | 225 | static struct platform_driver fs_enet_bb_mdio_driver = { |
227 | .driver = { | 226 | .driver = { |
228 | .name = "fsl-bb-mdio", | 227 | .name = "fsl-bb-mdio", |
229 | .owner = THIS_MODULE, | 228 | .owner = THIS_MODULE, |
@@ -235,12 +234,12 @@ static struct of_platform_driver fs_enet_bb_mdio_driver = { | |||
235 | 234 | ||
236 | static int fs_enet_mdio_bb_init(void) | 235 | static int fs_enet_mdio_bb_init(void) |
237 | { | 236 | { |
238 | return of_register_platform_driver(&fs_enet_bb_mdio_driver); | 237 | return platform_driver_register(&fs_enet_bb_mdio_driver); |
239 | } | 238 | } |
240 | 239 | ||
241 | static void fs_enet_mdio_bb_exit(void) | 240 | static void fs_enet_mdio_bb_exit(void) |
242 | { | 241 | { |
243 | of_unregister_platform_driver(&fs_enet_bb_mdio_driver); | 242 | platform_driver_unregister(&fs_enet_bb_mdio_driver); |
244 | } | 243 | } |
245 | 244 | ||
246 | module_init(fs_enet_mdio_bb_init); | 245 | module_init(fs_enet_mdio_bb_init); |
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index dbb9c48623df..7e840d373ab3 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
@@ -101,15 +101,18 @@ 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 platform_device *ofdev, | 104 | static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev) |
105 | const struct of_device_id *match) | ||
106 | { | 105 | { |
107 | struct resource res; | 106 | struct resource res; |
108 | struct mii_bus *new_bus; | 107 | struct mii_bus *new_bus; |
109 | struct fec_info *fec; | 108 | struct fec_info *fec; |
110 | int (*get_bus_freq)(struct device_node *) = match->data; | 109 | int (*get_bus_freq)(struct device_node *); |
111 | int ret = -ENOMEM, clock, speed; | 110 | int ret = -ENOMEM, clock, speed; |
112 | 111 | ||
112 | if (!ofdev->dev.of_match) | ||
113 | return -EINVAL; | ||
114 | get_bus_freq = ofdev->dev.of_match->data; | ||
115 | |||
113 | new_bus = mdiobus_alloc(); | 116 | new_bus = mdiobus_alloc(); |
114 | if (!new_bus) | 117 | if (!new_bus) |
115 | goto out; | 118 | goto out; |
@@ -221,7 +224,7 @@ static struct of_device_id fs_enet_mdio_fec_match[] = { | |||
221 | }; | 224 | }; |
222 | MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match); | 225 | MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match); |
223 | 226 | ||
224 | static struct of_platform_driver fs_enet_fec_mdio_driver = { | 227 | static struct platform_driver fs_enet_fec_mdio_driver = { |
225 | .driver = { | 228 | .driver = { |
226 | .name = "fsl-fec-mdio", | 229 | .name = "fsl-fec-mdio", |
227 | .owner = THIS_MODULE, | 230 | .owner = THIS_MODULE, |
@@ -233,12 +236,12 @@ static struct of_platform_driver fs_enet_fec_mdio_driver = { | |||
233 | 236 | ||
234 | static int fs_enet_mdio_fec_init(void) | 237 | static int fs_enet_mdio_fec_init(void) |
235 | { | 238 | { |
236 | return of_register_platform_driver(&fs_enet_fec_mdio_driver); | 239 | return platform_driver_register(&fs_enet_fec_mdio_driver); |
237 | } | 240 | } |
238 | 241 | ||
239 | static void fs_enet_mdio_fec_exit(void) | 242 | static void fs_enet_mdio_fec_exit(void) |
240 | { | 243 | { |
241 | of_unregister_platform_driver(&fs_enet_fec_mdio_driver); | 244 | platform_driver_unregister(&fs_enet_fec_mdio_driver); |
242 | } | 245 | } |
243 | 246 | ||
244 | module_init(fs_enet_mdio_fec_init); | 247 | module_init(fs_enet_mdio_fec_init); |
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c index 8d3a2ccbc953..52f4e8ad48e7 100644 --- a/drivers/net/fsl_pq_mdio.c +++ b/drivers/net/fsl_pq_mdio.c | |||
@@ -265,8 +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 platform_device *ofdev, | 268 | static int fsl_pq_mdio_probe(struct platform_device *ofdev) |
269 | const struct of_device_id *match) | ||
270 | { | 269 | { |
271 | struct device_node *np = ofdev->dev.of_node; | 270 | struct device_node *np = ofdev->dev.of_node; |
272 | struct device_node *tbi; | 271 | struct device_node *tbi; |
@@ -471,7 +470,7 @@ static struct of_device_id fsl_pq_mdio_match[] = { | |||
471 | }; | 470 | }; |
472 | MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match); | 471 | MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match); |
473 | 472 | ||
474 | static struct of_platform_driver fsl_pq_mdio_driver = { | 473 | static struct platform_driver fsl_pq_mdio_driver = { |
475 | .driver = { | 474 | .driver = { |
476 | .name = "fsl-pq_mdio", | 475 | .name = "fsl-pq_mdio", |
477 | .owner = THIS_MODULE, | 476 | .owner = THIS_MODULE, |
@@ -483,13 +482,13 @@ static struct of_platform_driver fsl_pq_mdio_driver = { | |||
483 | 482 | ||
484 | int __init fsl_pq_mdio_init(void) | 483 | int __init fsl_pq_mdio_init(void) |
485 | { | 484 | { |
486 | return of_register_platform_driver(&fsl_pq_mdio_driver); | 485 | return platform_driver_register(&fsl_pq_mdio_driver); |
487 | } | 486 | } |
488 | module_init(fsl_pq_mdio_init); | 487 | module_init(fsl_pq_mdio_init); |
489 | 488 | ||
490 | void fsl_pq_mdio_exit(void) | 489 | void fsl_pq_mdio_exit(void) |
491 | { | 490 | { |
492 | of_unregister_platform_driver(&fsl_pq_mdio_driver); | 491 | platform_driver_unregister(&fsl_pq_mdio_driver); |
493 | } | 492 | } |
494 | module_exit(fsl_pq_mdio_exit); | 493 | module_exit(fsl_pq_mdio_exit); |
495 | MODULE_LICENSE("GPL"); | 494 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 5ed8f9f9419f..ccb231c4d933 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -123,8 +123,7 @@ static irqreturn_t gfar_interrupt(int irq, void *dev_id); | |||
123 | static void adjust_link(struct net_device *dev); | 123 | static void adjust_link(struct net_device *dev); |
124 | static void init_registers(struct net_device *dev); | 124 | static void init_registers(struct net_device *dev); |
125 | static int init_phy(struct net_device *dev); | 125 | static int init_phy(struct net_device *dev); |
126 | static int gfar_probe(struct platform_device *ofdev, | 126 | static int gfar_probe(struct platform_device *ofdev); |
127 | const struct of_device_id *match); | ||
128 | static int gfar_remove(struct platform_device *ofdev); | 127 | static int gfar_remove(struct platform_device *ofdev); |
129 | static void free_skb_resources(struct gfar_private *priv); | 128 | static void free_skb_resources(struct gfar_private *priv); |
130 | static void gfar_set_multi(struct net_device *dev); | 129 | static void gfar_set_multi(struct net_device *dev); |
@@ -957,8 +956,7 @@ static void gfar_detect_errata(struct gfar_private *priv) | |||
957 | 956 | ||
958 | /* Set up the ethernet device structure, private data, | 957 | /* Set up the ethernet device structure, private data, |
959 | * and anything else we need before we start */ | 958 | * and anything else we need before we start */ |
960 | static int gfar_probe(struct platform_device *ofdev, | 959 | static int gfar_probe(struct platform_device *ofdev) |
961 | const struct of_device_id *match) | ||
962 | { | 960 | { |
963 | u32 tempval; | 961 | u32 tempval; |
964 | struct net_device *dev = NULL; | 962 | struct net_device *dev = NULL; |
@@ -3256,7 +3254,7 @@ static struct of_device_id gfar_match[] = | |||
3256 | MODULE_DEVICE_TABLE(of, gfar_match); | 3254 | MODULE_DEVICE_TABLE(of, gfar_match); |
3257 | 3255 | ||
3258 | /* Structure for a device driver */ | 3256 | /* Structure for a device driver */ |
3259 | static struct of_platform_driver gfar_driver = { | 3257 | static struct platform_driver gfar_driver = { |
3260 | .driver = { | 3258 | .driver = { |
3261 | .name = "fsl-gianfar", | 3259 | .name = "fsl-gianfar", |
3262 | .owner = THIS_MODULE, | 3260 | .owner = THIS_MODULE, |
@@ -3269,12 +3267,12 @@ static struct of_platform_driver gfar_driver = { | |||
3269 | 3267 | ||
3270 | static int __init gfar_init(void) | 3268 | static int __init gfar_init(void) |
3271 | { | 3269 | { |
3272 | return of_register_platform_driver(&gfar_driver); | 3270 | return platform_driver_register(&gfar_driver); |
3273 | } | 3271 | } |
3274 | 3272 | ||
3275 | static void __exit gfar_exit(void) | 3273 | static void __exit gfar_exit(void) |
3276 | { | 3274 | { |
3277 | of_unregister_platform_driver(&gfar_driver); | 3275 | platform_driver_unregister(&gfar_driver); |
3278 | } | 3276 | } |
3279 | 3277 | ||
3280 | module_init(gfar_init); | 3278 | module_init(gfar_init); |
diff --git a/drivers/net/greth.c b/drivers/net/greth.c index fdb0333f5cb6..396ff7d785d1 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c | |||
@@ -1411,7 +1411,7 @@ error: | |||
1411 | } | 1411 | } |
1412 | 1412 | ||
1413 | /* Initialize the GRETH MAC */ | 1413 | /* Initialize the GRETH MAC */ |
1414 | static int __devinit greth_of_probe(struct platform_device *ofdev, const struct of_device_id *match) | 1414 | static int __devinit greth_of_probe(struct platform_device *ofdev) |
1415 | { | 1415 | { |
1416 | struct net_device *dev; | 1416 | struct net_device *dev; |
1417 | struct greth_private *greth; | 1417 | struct greth_private *greth; |
@@ -1646,7 +1646,7 @@ static struct of_device_id greth_of_match[] = { | |||
1646 | 1646 | ||
1647 | MODULE_DEVICE_TABLE(of, greth_of_match); | 1647 | MODULE_DEVICE_TABLE(of, greth_of_match); |
1648 | 1648 | ||
1649 | static struct of_platform_driver greth_of_driver = { | 1649 | static struct platform_driver greth_of_driver = { |
1650 | .driver = { | 1650 | .driver = { |
1651 | .name = "grlib-greth", | 1651 | .name = "grlib-greth", |
1652 | .owner = THIS_MODULE, | 1652 | .owner = THIS_MODULE, |
@@ -1658,12 +1658,12 @@ static struct of_platform_driver greth_of_driver = { | |||
1658 | 1658 | ||
1659 | static int __init greth_init(void) | 1659 | static int __init greth_init(void) |
1660 | { | 1660 | { |
1661 | return of_register_platform_driver(&greth_of_driver); | 1661 | return platform_driver_register(&greth_of_driver); |
1662 | } | 1662 | } |
1663 | 1663 | ||
1664 | static void __exit greth_cleanup(void) | 1664 | static void __exit greth_cleanup(void) |
1665 | { | 1665 | { |
1666 | of_unregister_platform_driver(&greth_of_driver); | 1666 | platform_driver_unregister(&greth_of_driver); |
1667 | } | 1667 | } |
1668 | 1668 | ||
1669 | module_init(greth_init); | 1669 | module_init(greth_init); |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 6d9275c52e05..3bb990b6651a 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -2719,8 +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 platform_device *ofdev, | 2722 | static int __devinit emac_probe(struct platform_device *ofdev) |
2723 | const struct of_device_id *match) | ||
2724 | { | 2723 | { |
2725 | struct net_device *ndev; | 2724 | struct net_device *ndev; |
2726 | struct emac_instance *dev; | 2725 | struct emac_instance *dev; |
@@ -2994,7 +2993,7 @@ static struct of_device_id emac_match[] = | |||
2994 | }; | 2993 | }; |
2995 | MODULE_DEVICE_TABLE(of, emac_match); | 2994 | MODULE_DEVICE_TABLE(of, emac_match); |
2996 | 2995 | ||
2997 | static struct of_platform_driver emac_driver = { | 2996 | static struct platform_driver emac_driver = { |
2998 | .driver = { | 2997 | .driver = { |
2999 | .name = "emac", | 2998 | .name = "emac", |
3000 | .owner = THIS_MODULE, | 2999 | .owner = THIS_MODULE, |
@@ -3069,7 +3068,7 @@ static int __init emac_init(void) | |||
3069 | rc = tah_init(); | 3068 | rc = tah_init(); |
3070 | if (rc) | 3069 | if (rc) |
3071 | goto err_rgmii; | 3070 | goto err_rgmii; |
3072 | rc = of_register_platform_driver(&emac_driver); | 3071 | rc = platform_driver_register(&emac_driver); |
3073 | if (rc) | 3072 | if (rc) |
3074 | goto err_tah; | 3073 | goto err_tah; |
3075 | 3074 | ||
@@ -3091,7 +3090,7 @@ static void __exit emac_exit(void) | |||
3091 | { | 3090 | { |
3092 | int i; | 3091 | int i; |
3093 | 3092 | ||
3094 | of_unregister_platform_driver(&emac_driver); | 3093 | platform_driver_unregister(&emac_driver); |
3095 | 3094 | ||
3096 | tah_exit(); | 3095 | tah_exit(); |
3097 | rgmii_exit(); | 3096 | rgmii_exit(); |
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index d5717e2123e1..d268f404b7b0 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c | |||
@@ -517,8 +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 platform_device *ofdev, | 520 | static int __devinit mal_probe(struct platform_device *ofdev) |
521 | const struct of_device_id *match) | ||
522 | { | 521 | { |
523 | struct mal_instance *mal; | 522 | struct mal_instance *mal; |
524 | int err = 0, i, bd_size; | 523 | int err = 0, i, bd_size; |
@@ -789,7 +788,7 @@ static struct of_device_id mal_platform_match[] = | |||
789 | {}, | 788 | {}, |
790 | }; | 789 | }; |
791 | 790 | ||
792 | static struct of_platform_driver mal_of_driver = { | 791 | static struct platform_driver mal_of_driver = { |
793 | .driver = { | 792 | .driver = { |
794 | .name = "mcmal", | 793 | .name = "mcmal", |
795 | .owner = THIS_MODULE, | 794 | .owner = THIS_MODULE, |
@@ -801,10 +800,10 @@ static struct of_platform_driver mal_of_driver = { | |||
801 | 800 | ||
802 | int __init mal_init(void) | 801 | int __init mal_init(void) |
803 | { | 802 | { |
804 | return of_register_platform_driver(&mal_of_driver); | 803 | return platform_driver_register(&mal_of_driver); |
805 | } | 804 | } |
806 | 805 | ||
807 | void mal_exit(void) | 806 | void mal_exit(void) |
808 | { | 807 | { |
809 | of_unregister_platform_driver(&mal_of_driver); | 808 | platform_driver_unregister(&mal_of_driver); |
810 | } | 809 | } |
diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c index dd61798897ac..4fa53f3def64 100644 --- a/drivers/net/ibm_newemac/rgmii.c +++ b/drivers/net/ibm_newemac/rgmii.c | |||
@@ -228,8 +228,7 @@ void *rgmii_dump_regs(struct platform_device *ofdev, void *buf) | |||
228 | } | 228 | } |
229 | 229 | ||
230 | 230 | ||
231 | static int __devinit rgmii_probe(struct platform_device *ofdev, | 231 | static int __devinit rgmii_probe(struct platform_device *ofdev) |
232 | const struct of_device_id *match) | ||
233 | { | 232 | { |
234 | struct device_node *np = ofdev->dev.of_node; | 233 | struct device_node *np = ofdev->dev.of_node; |
235 | struct rgmii_instance *dev; | 234 | struct rgmii_instance *dev; |
@@ -318,7 +317,7 @@ static struct of_device_id rgmii_match[] = | |||
318 | {}, | 317 | {}, |
319 | }; | 318 | }; |
320 | 319 | ||
321 | static struct of_platform_driver rgmii_driver = { | 320 | static struct platform_driver rgmii_driver = { |
322 | .driver = { | 321 | .driver = { |
323 | .name = "emac-rgmii", | 322 | .name = "emac-rgmii", |
324 | .owner = THIS_MODULE, | 323 | .owner = THIS_MODULE, |
@@ -330,10 +329,10 @@ static struct of_platform_driver rgmii_driver = { | |||
330 | 329 | ||
331 | int __init rgmii_init(void) | 330 | int __init rgmii_init(void) |
332 | { | 331 | { |
333 | return of_register_platform_driver(&rgmii_driver); | 332 | return platform_driver_register(&rgmii_driver); |
334 | } | 333 | } |
335 | 334 | ||
336 | void rgmii_exit(void) | 335 | void rgmii_exit(void) |
337 | { | 336 | { |
338 | of_unregister_platform_driver(&rgmii_driver); | 337 | platform_driver_unregister(&rgmii_driver); |
339 | } | 338 | } |
diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c index 299aa49490c0..8ead6a96abaa 100644 --- a/drivers/net/ibm_newemac/tah.c +++ b/drivers/net/ibm_newemac/tah.c | |||
@@ -87,8 +87,7 @@ void *tah_dump_regs(struct platform_device *ofdev, void *buf) | |||
87 | return regs + 1; | 87 | return regs + 1; |
88 | } | 88 | } |
89 | 89 | ||
90 | static int __devinit tah_probe(struct platform_device *ofdev, | 90 | static int __devinit tah_probe(struct platform_device *ofdev) |
91 | const struct of_device_id *match) | ||
92 | { | 91 | { |
93 | struct device_node *np = ofdev->dev.of_node; | 92 | struct device_node *np = ofdev->dev.of_node; |
94 | struct tah_instance *dev; | 93 | struct tah_instance *dev; |
@@ -165,7 +164,7 @@ static struct of_device_id tah_match[] = | |||
165 | {}, | 164 | {}, |
166 | }; | 165 | }; |
167 | 166 | ||
168 | static struct of_platform_driver tah_driver = { | 167 | static struct platform_driver tah_driver = { |
169 | .driver = { | 168 | .driver = { |
170 | .name = "emac-tah", | 169 | .name = "emac-tah", |
171 | .owner = THIS_MODULE, | 170 | .owner = THIS_MODULE, |
@@ -177,10 +176,10 @@ static struct of_platform_driver tah_driver = { | |||
177 | 176 | ||
178 | int __init tah_init(void) | 177 | int __init tah_init(void) |
179 | { | 178 | { |
180 | return of_register_platform_driver(&tah_driver); | 179 | return platform_driver_register(&tah_driver); |
181 | } | 180 | } |
182 | 181 | ||
183 | void tah_exit(void) | 182 | void tah_exit(void) |
184 | { | 183 | { |
185 | of_unregister_platform_driver(&tah_driver); | 184 | platform_driver_unregister(&tah_driver); |
186 | } | 185 | } |
diff --git a/drivers/net/ibm_newemac/zmii.c b/drivers/net/ibm_newemac/zmii.c index 34ed6ee8ca8a..97449e786d61 100644 --- a/drivers/net/ibm_newemac/zmii.c +++ b/drivers/net/ibm_newemac/zmii.c | |||
@@ -231,8 +231,7 @@ void *zmii_dump_regs(struct platform_device *ofdev, void *buf) | |||
231 | return regs + 1; | 231 | return regs + 1; |
232 | } | 232 | } |
233 | 233 | ||
234 | static int __devinit zmii_probe(struct platform_device *ofdev, | 234 | static int __devinit zmii_probe(struct platform_device *ofdev) |
235 | const struct of_device_id *match) | ||
236 | { | 235 | { |
237 | struct device_node *np = ofdev->dev.of_node; | 236 | struct device_node *np = ofdev->dev.of_node; |
238 | struct zmii_instance *dev; | 237 | struct zmii_instance *dev; |
@@ -312,7 +311,7 @@ static struct of_device_id zmii_match[] = | |||
312 | {}, | 311 | {}, |
313 | }; | 312 | }; |
314 | 313 | ||
315 | static struct of_platform_driver zmii_driver = { | 314 | static struct platform_driver zmii_driver = { |
316 | .driver = { | 315 | .driver = { |
317 | .name = "emac-zmii", | 316 | .name = "emac-zmii", |
318 | .owner = THIS_MODULE, | 317 | .owner = THIS_MODULE, |
@@ -324,10 +323,10 @@ static struct of_platform_driver zmii_driver = { | |||
324 | 323 | ||
325 | int __init zmii_init(void) | 324 | int __init zmii_init(void) |
326 | { | 325 | { |
327 | return of_register_platform_driver(&zmii_driver); | 326 | return platform_driver_register(&zmii_driver); |
328 | } | 327 | } |
329 | 328 | ||
330 | void zmii_exit(void) | 329 | void zmii_exit(void) |
331 | { | 330 | { |
332 | of_unregister_platform_driver(&zmii_driver); | 331 | platform_driver_unregister(&zmii_driver); |
333 | } | 332 | } |
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index f35554d11441..b7948ccfcf7d 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
@@ -952,8 +952,7 @@ static const struct attribute_group temac_attr_group = { | |||
952 | .attrs = temac_device_attrs, | 952 | .attrs = temac_device_attrs, |
953 | }; | 953 | }; |
954 | 954 | ||
955 | static int __devinit | 955 | static int __devinit temac_of_probe(struct platform_device *op) |
956 | temac_of_probe(struct platform_device *op, const struct of_device_id *match) | ||
957 | { | 956 | { |
958 | struct device_node *np; | 957 | struct device_node *np; |
959 | struct temac_local *lp; | 958 | struct temac_local *lp; |
@@ -1123,7 +1122,7 @@ static struct of_device_id temac_of_match[] __devinitdata = { | |||
1123 | }; | 1122 | }; |
1124 | MODULE_DEVICE_TABLE(of, temac_of_match); | 1123 | MODULE_DEVICE_TABLE(of, temac_of_match); |
1125 | 1124 | ||
1126 | static struct of_platform_driver temac_of_driver = { | 1125 | static struct platform_driver temac_of_driver = { |
1127 | .probe = temac_of_probe, | 1126 | .probe = temac_of_probe, |
1128 | .remove = __devexit_p(temac_of_remove), | 1127 | .remove = __devexit_p(temac_of_remove), |
1129 | .driver = { | 1128 | .driver = { |
@@ -1135,13 +1134,13 @@ static struct of_platform_driver temac_of_driver = { | |||
1135 | 1134 | ||
1136 | static int __init temac_init(void) | 1135 | static int __init temac_init(void) |
1137 | { | 1136 | { |
1138 | return of_register_platform_driver(&temac_of_driver); | 1137 | return platform_driver_register(&temac_of_driver); |
1139 | } | 1138 | } |
1140 | module_init(temac_init); | 1139 | module_init(temac_init); |
1141 | 1140 | ||
1142 | static void __exit temac_exit(void) | 1141 | static void __exit temac_exit(void) |
1143 | { | 1142 | { |
1144 | of_unregister_platform_driver(&temac_of_driver); | 1143 | platform_driver_unregister(&temac_of_driver); |
1145 | } | 1144 | } |
1146 | module_exit(temac_exit); | 1145 | module_exit(temac_exit); |
1147 | 1146 | ||
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 4846e131a04e..a761076b69c3 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 platform_device *op, const struct of_device_id *match) | 929 | static int __devinit myri_sbus_probe(struct platform_device *op) |
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; |
@@ -1160,7 +1160,7 @@ static const struct of_device_id myri_sbus_match[] = { | |||
1160 | 1160 | ||
1161 | MODULE_DEVICE_TABLE(of, myri_sbus_match); | 1161 | MODULE_DEVICE_TABLE(of, myri_sbus_match); |
1162 | 1162 | ||
1163 | static struct of_platform_driver myri_sbus_driver = { | 1163 | static struct platform_driver myri_sbus_driver = { |
1164 | .driver = { | 1164 | .driver = { |
1165 | .name = "myri", | 1165 | .name = "myri", |
1166 | .owner = THIS_MODULE, | 1166 | .owner = THIS_MODULE, |
@@ -1172,12 +1172,12 @@ static struct of_platform_driver myri_sbus_driver = { | |||
1172 | 1172 | ||
1173 | static int __init myri_sbus_init(void) | 1173 | static int __init myri_sbus_init(void) |
1174 | { | 1174 | { |
1175 | return of_register_platform_driver(&myri_sbus_driver); | 1175 | return platform_driver_register(&myri_sbus_driver); |
1176 | } | 1176 | } |
1177 | 1177 | ||
1178 | static void __exit myri_sbus_exit(void) | 1178 | static void __exit myri_sbus_exit(void) |
1179 | { | 1179 | { |
1180 | of_unregister_platform_driver(&myri_sbus_driver); | 1180 | platform_driver_unregister(&myri_sbus_driver); |
1181 | } | 1181 | } |
1182 | 1182 | ||
1183 | module_init(myri_sbus_init); | 1183 | module_init(myri_sbus_init); |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 9fb59d3f9c92..40fa59e2fd5c 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -10062,8 +10062,7 @@ static const struct niu_ops niu_phys_ops = { | |||
10062 | .unmap_single = niu_phys_unmap_single, | 10062 | .unmap_single = niu_phys_unmap_single, |
10063 | }; | 10063 | }; |
10064 | 10064 | ||
10065 | static int __devinit niu_of_probe(struct platform_device *op, | 10065 | static int __devinit niu_of_probe(struct platform_device *op) |
10066 | const struct of_device_id *match) | ||
10067 | { | 10066 | { |
10068 | union niu_parent_id parent_id; | 10067 | union niu_parent_id parent_id; |
10069 | struct net_device *dev; | 10068 | struct net_device *dev; |
@@ -10223,7 +10222,7 @@ static const struct of_device_id niu_match[] = { | |||
10223 | }; | 10222 | }; |
10224 | MODULE_DEVICE_TABLE(of, niu_match); | 10223 | MODULE_DEVICE_TABLE(of, niu_match); |
10225 | 10224 | ||
10226 | static struct of_platform_driver niu_of_driver = { | 10225 | static struct platform_driver niu_of_driver = { |
10227 | .driver = { | 10226 | .driver = { |
10228 | .name = "niu", | 10227 | .name = "niu", |
10229 | .owner = THIS_MODULE, | 10228 | .owner = THIS_MODULE, |
@@ -10244,14 +10243,14 @@ static int __init niu_init(void) | |||
10244 | niu_debug = netif_msg_init(debug, NIU_MSG_DEFAULT); | 10243 | niu_debug = netif_msg_init(debug, NIU_MSG_DEFAULT); |
10245 | 10244 | ||
10246 | #ifdef CONFIG_SPARC64 | 10245 | #ifdef CONFIG_SPARC64 |
10247 | err = of_register_platform_driver(&niu_of_driver); | 10246 | err = platform_driver_register(&niu_of_driver); |
10248 | #endif | 10247 | #endif |
10249 | 10248 | ||
10250 | if (!err) { | 10249 | if (!err) { |
10251 | err = pci_register_driver(&niu_pci_driver); | 10250 | err = pci_register_driver(&niu_pci_driver); |
10252 | #ifdef CONFIG_SPARC64 | 10251 | #ifdef CONFIG_SPARC64 |
10253 | if (err) | 10252 | if (err) |
10254 | of_unregister_platform_driver(&niu_of_driver); | 10253 | platform_driver_unregister(&niu_of_driver); |
10255 | #endif | 10254 | #endif |
10256 | } | 10255 | } |
10257 | 10256 | ||
@@ -10262,7 +10261,7 @@ static void __exit niu_exit(void) | |||
10262 | { | 10261 | { |
10263 | pci_unregister_driver(&niu_pci_driver); | 10262 | pci_unregister_driver(&niu_pci_driver); |
10264 | #ifdef CONFIG_SPARC64 | 10263 | #ifdef CONFIG_SPARC64 |
10265 | of_unregister_platform_driver(&niu_of_driver); | 10264 | platform_driver_unregister(&niu_of_driver); |
10266 | #endif | 10265 | #endif |
10267 | } | 10266 | } |
10268 | 10267 | ||
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index f62c7b717bc8..47c8339a0359 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c | |||
@@ -188,8 +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 platform_device *ofdev, | 191 | static int __devinit mdio_ofgpio_probe(struct platform_device *ofdev) |
192 | const struct of_device_id *match) | ||
193 | { | 192 | { |
194 | struct mdio_gpio_platform_data *pdata; | 193 | struct mdio_gpio_platform_data *pdata; |
195 | struct mii_bus *new_bus; | 194 | struct mii_bus *new_bus; |
@@ -240,7 +239,7 @@ static struct of_device_id mdio_ofgpio_match[] = { | |||
240 | }; | 239 | }; |
241 | MODULE_DEVICE_TABLE(of, mdio_ofgpio_match); | 240 | MODULE_DEVICE_TABLE(of, mdio_ofgpio_match); |
242 | 241 | ||
243 | static struct of_platform_driver mdio_ofgpio_driver = { | 242 | static struct platform_driver mdio_ofgpio_driver = { |
244 | .driver = { | 243 | .driver = { |
245 | .name = "mdio-gpio", | 244 | .name = "mdio-gpio", |
246 | .owner = THIS_MODULE, | 245 | .owner = THIS_MODULE, |
@@ -252,12 +251,12 @@ static struct of_platform_driver mdio_ofgpio_driver = { | |||
252 | 251 | ||
253 | static inline int __init mdio_ofgpio_init(void) | 252 | static inline int __init mdio_ofgpio_init(void) |
254 | { | 253 | { |
255 | return of_register_platform_driver(&mdio_ofgpio_driver); | 254 | return platform_driver_register(&mdio_ofgpio_driver); |
256 | } | 255 | } |
257 | 256 | ||
258 | static inline void __exit mdio_ofgpio_exit(void) | 257 | static inline void __exit mdio_ofgpio_exit(void) |
259 | { | 258 | { |
260 | of_unregister_platform_driver(&mdio_ofgpio_driver); | 259 | platform_driver_unregister(&mdio_ofgpio_driver); |
261 | } | 260 | } |
262 | #else | 261 | #else |
263 | static inline int __init mdio_ofgpio_init(void) { return 0; } | 262 | static inline int __init mdio_ofgpio_init(void) { return 0; } |
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 0a6a5ced3c1c..aa4765803a4c 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
@@ -1242,8 +1242,7 @@ 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 platform_device *op, | 1245 | static int __devinit bigmac_sbus_probe(struct platform_device *op) |
1246 | const struct of_device_id *match) | ||
1247 | { | 1246 | { |
1248 | struct device *parent = op->dev.parent; | 1247 | struct device *parent = op->dev.parent; |
1249 | struct platform_device *qec_op; | 1248 | struct platform_device *qec_op; |
@@ -1289,7 +1288,7 @@ static const struct of_device_id bigmac_sbus_match[] = { | |||
1289 | 1288 | ||
1290 | MODULE_DEVICE_TABLE(of, bigmac_sbus_match); | 1289 | MODULE_DEVICE_TABLE(of, bigmac_sbus_match); |
1291 | 1290 | ||
1292 | static struct of_platform_driver bigmac_sbus_driver = { | 1291 | static struct platform_driver bigmac_sbus_driver = { |
1293 | .driver = { | 1292 | .driver = { |
1294 | .name = "sunbmac", | 1293 | .name = "sunbmac", |
1295 | .owner = THIS_MODULE, | 1294 | .owner = THIS_MODULE, |
@@ -1301,12 +1300,12 @@ static struct of_platform_driver bigmac_sbus_driver = { | |||
1301 | 1300 | ||
1302 | static int __init bigmac_init(void) | 1301 | static int __init bigmac_init(void) |
1303 | { | 1302 | { |
1304 | return of_register_platform_driver(&bigmac_sbus_driver); | 1303 | return platform_driver_register(&bigmac_sbus_driver); |
1305 | } | 1304 | } |
1306 | 1305 | ||
1307 | static void __exit bigmac_exit(void) | 1306 | static void __exit bigmac_exit(void) |
1308 | { | 1307 | { |
1309 | of_unregister_platform_driver(&bigmac_sbus_driver); | 1308 | platform_driver_unregister(&bigmac_sbus_driver); |
1310 | } | 1309 | } |
1311 | 1310 | ||
1312 | module_init(bigmac_init); | 1311 | module_init(bigmac_init); |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 55bbb9c15d96..eb4f59fb01e9 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -3237,11 +3237,15 @@ static void happy_meal_pci_exit(void) | |||
3237 | #endif | 3237 | #endif |
3238 | 3238 | ||
3239 | #ifdef CONFIG_SBUS | 3239 | #ifdef CONFIG_SBUS |
3240 | static int __devinit hme_sbus_probe(struct platform_device *op, const struct of_device_id *match) | 3240 | static int __devinit hme_sbus_probe(struct platform_device *op) |
3241 | { | 3241 | { |
3242 | struct device_node *dp = op->dev.of_node; | 3242 | struct device_node *dp = op->dev.of_node; |
3243 | const char *model = of_get_property(dp, "model", NULL); | 3243 | const char *model = of_get_property(dp, "model", NULL); |
3244 | int is_qfe = (match->data != NULL); | 3244 | int is_qfe; |
3245 | |||
3246 | if (!op->dev.of_match) | ||
3247 | return -EINVAL; | ||
3248 | is_qfe = (op->dev.of_match->data != NULL); | ||
3245 | 3249 | ||
3246 | if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) | 3250 | if (!is_qfe && model && !strcmp(model, "SUNW,sbus-qfe")) |
3247 | is_qfe = 1; | 3251 | is_qfe = 1; |
@@ -3292,7 +3296,7 @@ static const struct of_device_id hme_sbus_match[] = { | |||
3292 | 3296 | ||
3293 | MODULE_DEVICE_TABLE(of, hme_sbus_match); | 3297 | MODULE_DEVICE_TABLE(of, hme_sbus_match); |
3294 | 3298 | ||
3295 | static struct of_platform_driver hme_sbus_driver = { | 3299 | static struct platform_driver hme_sbus_driver = { |
3296 | .driver = { | 3300 | .driver = { |
3297 | .name = "hme", | 3301 | .name = "hme", |
3298 | .owner = THIS_MODULE, | 3302 | .owner = THIS_MODULE, |
@@ -3306,7 +3310,7 @@ static int __init happy_meal_sbus_init(void) | |||
3306 | { | 3310 | { |
3307 | int err; | 3311 | int err; |
3308 | 3312 | ||
3309 | err = of_register_platform_driver(&hme_sbus_driver); | 3313 | err = platform_driver_register(&hme_sbus_driver); |
3310 | if (!err) | 3314 | if (!err) |
3311 | err = quattro_sbus_register_irqs(); | 3315 | err = quattro_sbus_register_irqs(); |
3312 | 3316 | ||
@@ -3315,7 +3319,7 @@ static int __init happy_meal_sbus_init(void) | |||
3315 | 3319 | ||
3316 | static void happy_meal_sbus_exit(void) | 3320 | static void happy_meal_sbus_exit(void) |
3317 | { | 3321 | { |
3318 | of_unregister_platform_driver(&hme_sbus_driver); | 3322 | platform_driver_unregister(&hme_sbus_driver); |
3319 | quattro_sbus_free_irqs(); | 3323 | quattro_sbus_free_irqs(); |
3320 | 3324 | ||
3321 | while (qfe_sbus_list) { | 3325 | while (qfe_sbus_list) { |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 767e1e2b210d..32a5c7f63c43 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -1495,7 +1495,7 @@ fail: | |||
1495 | return -ENODEV; | 1495 | return -ENODEV; |
1496 | } | 1496 | } |
1497 | 1497 | ||
1498 | static int __devinit sunlance_sbus_probe(struct platform_device *op, const struct of_device_id *match) | 1498 | static int __devinit sunlance_sbus_probe(struct platform_device *op) |
1499 | { | 1499 | { |
1500 | struct platform_device *parent = to_platform_device(op->dev.parent); | 1500 | struct platform_device *parent = to_platform_device(op->dev.parent); |
1501 | struct device_node *parent_dp = parent->dev.of_node; | 1501 | struct device_node *parent_dp = parent->dev.of_node; |
@@ -1536,7 +1536,7 @@ static const struct of_device_id sunlance_sbus_match[] = { | |||
1536 | 1536 | ||
1537 | MODULE_DEVICE_TABLE(of, sunlance_sbus_match); | 1537 | MODULE_DEVICE_TABLE(of, sunlance_sbus_match); |
1538 | 1538 | ||
1539 | static struct of_platform_driver sunlance_sbus_driver = { | 1539 | static struct platform_driver sunlance_sbus_driver = { |
1540 | .driver = { | 1540 | .driver = { |
1541 | .name = "sunlance", | 1541 | .name = "sunlance", |
1542 | .owner = THIS_MODULE, | 1542 | .owner = THIS_MODULE, |
@@ -1550,12 +1550,12 @@ static struct of_platform_driver sunlance_sbus_driver = { | |||
1550 | /* Find all the lance cards on the system and initialize them */ | 1550 | /* Find all the lance cards on the system and initialize them */ |
1551 | static int __init sparc_lance_init(void) | 1551 | static int __init sparc_lance_init(void) |
1552 | { | 1552 | { |
1553 | return of_register_platform_driver(&sunlance_sbus_driver); | 1553 | return platform_driver_register(&sunlance_sbus_driver); |
1554 | } | 1554 | } |
1555 | 1555 | ||
1556 | static void __exit sparc_lance_exit(void) | 1556 | static void __exit sparc_lance_exit(void) |
1557 | { | 1557 | { |
1558 | of_unregister_platform_driver(&sunlance_sbus_driver); | 1558 | platform_driver_unregister(&sunlance_sbus_driver); |
1559 | } | 1559 | } |
1560 | 1560 | ||
1561 | module_init(sparc_lance_init); | 1561 | module_init(sparc_lance_init); |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 9536b2f010be..18ecdc303751 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -941,7 +941,7 @@ fail: | |||
941 | return res; | 941 | return res; |
942 | } | 942 | } |
943 | 943 | ||
944 | static int __devinit qec_sbus_probe(struct platform_device *op, const struct of_device_id *match) | 944 | static int __devinit qec_sbus_probe(struct platform_device *op) |
945 | { | 945 | { |
946 | return qec_ether_init(op); | 946 | return qec_ether_init(op); |
947 | } | 947 | } |
@@ -976,7 +976,7 @@ static const struct of_device_id qec_sbus_match[] = { | |||
976 | 976 | ||
977 | MODULE_DEVICE_TABLE(of, qec_sbus_match); | 977 | MODULE_DEVICE_TABLE(of, qec_sbus_match); |
978 | 978 | ||
979 | static struct of_platform_driver qec_sbus_driver = { | 979 | static struct platform_driver qec_sbus_driver = { |
980 | .driver = { | 980 | .driver = { |
981 | .name = "qec", | 981 | .name = "qec", |
982 | .owner = THIS_MODULE, | 982 | .owner = THIS_MODULE, |
@@ -988,12 +988,12 @@ static struct of_platform_driver qec_sbus_driver = { | |||
988 | 988 | ||
989 | static int __init qec_init(void) | 989 | static int __init qec_init(void) |
990 | { | 990 | { |
991 | return of_register_platform_driver(&qec_sbus_driver); | 991 | return platform_driver_register(&qec_sbus_driver); |
992 | } | 992 | } |
993 | 993 | ||
994 | static void __exit qec_exit(void) | 994 | static void __exit qec_exit(void) |
995 | { | 995 | { |
996 | of_unregister_platform_driver(&qec_sbus_driver); | 996 | platform_driver_unregister(&qec_sbus_driver); |
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; |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 715e7b47e7e9..ef041057d9d3 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -3740,7 +3740,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = { | |||
3740 | #endif | 3740 | #endif |
3741 | }; | 3741 | }; |
3742 | 3742 | ||
3743 | static int ucc_geth_probe(struct platform_device* ofdev, const struct of_device_id *match) | 3743 | static int ucc_geth_probe(struct platform_device* ofdev) |
3744 | { | 3744 | { |
3745 | struct device *device = &ofdev->dev; | 3745 | struct device *device = &ofdev->dev; |
3746 | struct device_node *np = ofdev->dev.of_node; | 3746 | struct device_node *np = ofdev->dev.of_node; |
@@ -3986,7 +3986,7 @@ static struct of_device_id ucc_geth_match[] = { | |||
3986 | 3986 | ||
3987 | MODULE_DEVICE_TABLE(of, ucc_geth_match); | 3987 | MODULE_DEVICE_TABLE(of, ucc_geth_match); |
3988 | 3988 | ||
3989 | static struct of_platform_driver ucc_geth_driver = { | 3989 | static struct platform_driver ucc_geth_driver = { |
3990 | .driver = { | 3990 | .driver = { |
3991 | .name = DRV_NAME, | 3991 | .name = DRV_NAME, |
3992 | .owner = THIS_MODULE, | 3992 | .owner = THIS_MODULE, |
@@ -4008,14 +4008,14 @@ static int __init ucc_geth_init(void) | |||
4008 | memcpy(&(ugeth_info[i]), &ugeth_primary_info, | 4008 | memcpy(&(ugeth_info[i]), &ugeth_primary_info, |
4009 | sizeof(ugeth_primary_info)); | 4009 | sizeof(ugeth_primary_info)); |
4010 | 4010 | ||
4011 | ret = of_register_platform_driver(&ucc_geth_driver); | 4011 | ret = platform_driver_register(&ucc_geth_driver); |
4012 | 4012 | ||
4013 | return ret; | 4013 | return ret; |
4014 | } | 4014 | } |
4015 | 4015 | ||
4016 | static void __exit ucc_geth_exit(void) | 4016 | static void __exit ucc_geth_exit(void) |
4017 | { | 4017 | { |
4018 | of_unregister_platform_driver(&ucc_geth_driver); | 4018 | platform_driver_unregister(&ucc_geth_driver); |
4019 | } | 4019 | } |
4020 | 4020 | ||
4021 | module_init(ucc_geth_init); | 4021 | module_init(ucc_geth_init); |
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index cad66ce1640b..2642af4ee491 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c | |||
@@ -1101,8 +1101,7 @@ static struct net_device_ops xemaclite_netdev_ops; | |||
1101 | * Return: 0, if the driver is bound to the Emaclite device, or | 1101 | * Return: 0, if the driver is bound to the Emaclite device, or |
1102 | * a negative error if there is failure. | 1102 | * a negative error if there is failure. |
1103 | */ | 1103 | */ |
1104 | static int __devinit xemaclite_of_probe(struct platform_device *ofdev, | 1104 | static int __devinit xemaclite_of_probe(struct platform_device *ofdev) |
1105 | const struct of_device_id *match) | ||
1106 | { | 1105 | { |
1107 | struct resource r_irq; /* Interrupt resources */ | 1106 | struct resource r_irq; /* Interrupt resources */ |
1108 | struct resource r_mem; /* IO mem resources */ | 1107 | struct resource r_mem; /* IO mem resources */ |
@@ -1288,7 +1287,7 @@ static struct of_device_id xemaclite_of_match[] __devinitdata = { | |||
1288 | }; | 1287 | }; |
1289 | MODULE_DEVICE_TABLE(of, xemaclite_of_match); | 1288 | MODULE_DEVICE_TABLE(of, xemaclite_of_match); |
1290 | 1289 | ||
1291 | static struct of_platform_driver xemaclite_of_driver = { | 1290 | static struct platform_driver xemaclite_of_driver = { |
1292 | .driver = { | 1291 | .driver = { |
1293 | .name = DRIVER_NAME, | 1292 | .name = DRIVER_NAME, |
1294 | .owner = THIS_MODULE, | 1293 | .owner = THIS_MODULE, |
@@ -1306,7 +1305,7 @@ static struct of_platform_driver xemaclite_of_driver = { | |||
1306 | static int __init xemaclite_init(void) | 1305 | static int __init xemaclite_init(void) |
1307 | { | 1306 | { |
1308 | /* No kernel boot options used, we just need to register the driver */ | 1307 | /* No kernel boot options used, we just need to register the driver */ |
1309 | return of_register_platform_driver(&xemaclite_of_driver); | 1308 | return platform_driver_register(&xemaclite_of_driver); |
1310 | } | 1309 | } |
1311 | 1310 | ||
1312 | /** | 1311 | /** |
@@ -1314,7 +1313,7 @@ static int __init xemaclite_init(void) | |||
1314 | */ | 1313 | */ |
1315 | static void __exit xemaclite_cleanup(void) | 1314 | static void __exit xemaclite_cleanup(void) |
1316 | { | 1315 | { |
1317 | of_unregister_platform_driver(&xemaclite_of_driver); | 1316 | platform_driver_unregister(&xemaclite_of_driver); |
1318 | } | 1317 | } |
1319 | 1318 | ||
1320 | module_init(xemaclite_init); | 1319 | module_init(xemaclite_init); |