diff options
Diffstat (limited to 'drivers/net/jazzsonic.c')
| -rw-r--r-- | drivers/net/jazzsonic.c | 21 | 
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c index 2fb3101cb33e..b039bd89ceb9 100644 --- a/drivers/net/jazzsonic.c +++ b/drivers/net/jazzsonic.c  | |||
| @@ -194,7 +194,7 @@ out: | |||
| 194 | * Probe for a SONIC ethernet controller on a Mips Jazz board. | 194 | * Probe for a SONIC ethernet controller on a Mips Jazz board. | 
| 195 | * Actually probing is superfluous but we're paranoid. | 195 | * Actually probing is superfluous but we're paranoid. | 
| 196 | */ | 196 | */ | 
| 197 | static int __init jazz_sonic_probe(struct device *device) | 197 | static int __init jazz_sonic_probe(struct platform_device *pdev) | 
| 198 | { | 198 | { | 
| 199 | struct net_device *dev; | 199 | struct net_device *dev; | 
| 200 | struct sonic_local *lp; | 200 | struct sonic_local *lp; | 
| @@ -212,8 +212,8 @@ static int __init jazz_sonic_probe(struct device *device) | |||
| 212 | return -ENOMEM; | 212 | return -ENOMEM; | 
| 213 | 213 | ||
| 214 | lp = netdev_priv(dev); | 214 | lp = netdev_priv(dev); | 
| 215 | lp->device = device; | 215 | lp->device = &pdev->dev; | 
| 216 | SET_NETDEV_DEV(dev, device); | 216 | SET_NETDEV_DEV(dev, &pdev->dev); | 
| 217 | SET_MODULE_OWNER(dev); | 217 | SET_MODULE_OWNER(dev); | 
| 218 | 218 | ||
| 219 | netdev_boot_setup_check(dev); | 219 | netdev_boot_setup_check(dev); | 
| @@ -264,9 +264,9 @@ MODULE_PARM_DESC(sonic_debug, "jazzsonic debug level (1-4)"); | |||
| 264 | 264 | ||
| 265 | #include "sonic.c" | 265 | #include "sonic.c" | 
| 266 | 266 | ||
| 267 | static int __devexit jazz_sonic_device_remove (struct device *device) | 267 | static int __devexit jazz_sonic_device_remove (struct platform_device *pdev) | 
| 268 | { | 268 | { | 
| 269 | struct net_device *dev = device->driver_data; | 269 | struct net_device *dev = platform_get_drvdata(pdev); | 
| 270 | struct sonic_local* lp = netdev_priv(dev); | 270 | struct sonic_local* lp = netdev_priv(dev); | 
| 271 | 271 | ||
| 272 | unregister_netdev (dev); | 272 | unregister_netdev (dev); | 
| @@ -278,18 +278,19 @@ static int __devexit jazz_sonic_device_remove (struct device *device) | |||
| 278 | return 0; | 278 | return 0; | 
| 279 | } | 279 | } | 
| 280 | 280 | ||
| 281 | static struct device_driver jazz_sonic_driver = { | 281 | static struct platform_driver jazz_sonic_driver = { | 
| 282 | .name = jazz_sonic_string, | ||
| 283 | .bus = &platform_bus_type, | ||
| 284 | .probe = jazz_sonic_probe, | 282 | .probe = jazz_sonic_probe, | 
| 285 | .remove = __devexit_p(jazz_sonic_device_remove), | 283 | .remove = __devexit_p(jazz_sonic_device_remove), | 
| 284 | .driver = { | ||
| 285 | .name = jazz_sonic_string, | ||
| 286 | }, | ||
| 286 | }; | 287 | }; | 
| 287 | 288 | ||
| 288 | static int __init jazz_sonic_init_module(void) | 289 | static int __init jazz_sonic_init_module(void) | 
| 289 | { | 290 | { | 
| 290 | int err; | 291 | int err; | 
| 291 | 292 | ||
| 292 | if ((err = driver_register(&jazz_sonic_driver))) { | 293 | if ((err = platform_driver_register(&jazz_sonic_driver))) { | 
| 293 | printk(KERN_ERR "Driver registration failed\n"); | 294 | printk(KERN_ERR "Driver registration failed\n"); | 
| 294 | return err; | 295 | return err; | 
| 295 | } | 296 | } | 
| @@ -313,7 +314,7 @@ out_unregister: | |||
| 313 | 314 | ||
| 314 | static void __exit jazz_sonic_cleanup_module(void) | 315 | static void __exit jazz_sonic_cleanup_module(void) | 
| 315 | { | 316 | { | 
| 316 | driver_unregister(&jazz_sonic_driver); | 317 | platform_driver_unregister(&jazz_sonic_driver); | 
| 317 | 318 | ||
| 318 | if (jazz_sonic_device) { | 319 | if (jazz_sonic_device) { | 
| 319 | platform_device_unregister(jazz_sonic_device); | 320 | platform_device_unregister(jazz_sonic_device); | 
