diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-03-17 07:44:08 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-03-17 07:44:08 (GMT) |
commit | 1d2a1959fe534279cf37aba20b08c24c20840e52 (patch) | |
tree | 67c0b9aa7fe22a44bf0b4af88947799203eb8f67 /drivers/net/fs_enet/mii-fec.c | |
parent | 5a79ce76e9bb8f4b2cd8106ee36d15ee05013bcf (diff) | |
parent | 054cfaacf88865bff1dd58d305443d5d6c068a08 (diff) | |
download | linux-1d2a1959fe534279cf37aba20b08c24c20840e52.tar.xz |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into sh-latest
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); |