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 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); |