diff options
Diffstat (limited to 'drivers/net/fs_enet/mii-fec.c')
-rw-r--r-- | drivers/net/fs_enet/mii-fec.c | 15 |
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 dbb9c48..7e840d3 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) return 0; } -static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev, - const struct of_device_id *match) +static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev) { struct resource res; struct mii_bus *new_bus; struct fec_info *fec; - int (*get_bus_freq)(struct device_node *) = match->data; + int (*get_bus_freq)(struct device_node *); int ret = -ENOMEM, clock, speed; + if (!ofdev->dev.of_match) + return -EINVAL; + get_bus_freq = ofdev->dev.of_match->data; + new_bus = mdiobus_alloc(); if (!new_bus) goto out; @@ -221,7 +224,7 @@ static struct of_device_id fs_enet_mdio_fec_match[] = { }; MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match); -static struct of_platform_driver fs_enet_fec_mdio_driver = { +static struct platform_driver fs_enet_fec_mdio_driver = { .driver = { .name = "fsl-fec-mdio", .owner = THIS_MODULE, @@ -233,12 +236,12 @@ static struct of_platform_driver fs_enet_fec_mdio_driver = { static int fs_enet_mdio_fec_init(void) { - return of_register_platform_driver(&fs_enet_fec_mdio_driver); + return platform_driver_register(&fs_enet_fec_mdio_driver); } static void fs_enet_mdio_fec_exit(void) { - of_unregister_platform_driver(&fs_enet_fec_mdio_driver); + platform_driver_unregister(&fs_enet_fec_mdio_driver); } module_init(fs_enet_mdio_fec_init); |