aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fs_enet/mii-fec.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/fs_enet/mii-fec.c')
-rw-r--r--drivers/net/fs_enet/mii-fec.c15
1 files changed, 9 insertions, 6 deletions
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
104static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev, 104static 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};
222MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match); 225MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match);
223 226
224static struct of_platform_driver fs_enet_fec_mdio_driver = { 227static 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
234static int fs_enet_mdio_fec_init(void) 237static 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
239static void fs_enet_mdio_fec_exit(void) 242static 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
244module_init(fs_enet_mdio_fec_init); 247module_init(fs_enet_mdio_fec_init);