diff options
author | Steve French <sfrench@us.ibm.com> | 2005-11-12 19:53:33 -0800 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-11-12 19:53:33 -0800 |
commit | 1b98a8221e3c9c86ae7e292ba7542d2dd6f10eb9 (patch) | |
tree | 2e0051ccb147b0553d50c14681c50881098859d6 /drivers/net/macsonic.c | |
parent | e89dc9209692293434da45ec31826a55becb91c0 (diff) | |
parent | 9e6c67fd2716720d9029d38ea25884efcfdedeb6 (diff) | |
download | kernel_samsung_smdk4412-1b98a8221e3c9c86ae7e292ba7542d2dd6f10eb9.tar.gz kernel_samsung_smdk4412-1b98a8221e3c9c86ae7e292ba7542d2dd6f10eb9.tar.bz2 kernel_samsung_smdk4412-1b98a8221e3c9c86ae7e292ba7542d2dd6f10eb9.zip |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/net/macsonic.c')
-rw-r--r-- | drivers/net/macsonic.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c index 9ef4592aca0..02d5c682273 100644 --- a/drivers/net/macsonic.c +++ b/drivers/net/macsonic.c @@ -525,7 +525,7 @@ int __init mac_nubus_sonic_probe(struct net_device* dev) return macsonic_init(dev); } -static int __init mac_sonic_probe(struct device *device) +static int __init mac_sonic_probe(struct platform_device *device) { struct net_device *dev; struct sonic_local *lp; @@ -537,8 +537,8 @@ static int __init mac_sonic_probe(struct device *device) return -ENOMEM; lp = netdev_priv(dev); - lp->device = device; - SET_NETDEV_DEV(dev, device); + lp->device = &device->dev; + SET_NETDEV_DEV(dev, &device->dev); SET_MODULE_OWNER(dev); /* This will catch fatal stuff like -ENOMEM as well as success */ @@ -579,9 +579,9 @@ MODULE_PARM_DESC(sonic_debug, "macsonic debug level (1-4)"); #include "sonic.c" -static int __devexit mac_sonic_device_remove (struct device *device) +static int __devexit mac_sonic_device_remove (struct platform_device *device) { - struct net_device *dev = device->driver_data; + struct net_device *dev = platform_get_drvdata(device); struct sonic_local* lp = netdev_priv(dev); unregister_netdev (dev); @@ -592,18 +592,19 @@ static int __devexit mac_sonic_device_remove (struct device *device) return 0; } -static struct device_driver mac_sonic_driver = { - .name = mac_sonic_string, - .bus = &platform_bus_type, +static struct platform_driver mac_sonic_driver = { .probe = mac_sonic_probe, .remove = __devexit_p(mac_sonic_device_remove), + .driver = { + .name = mac_sonic_string, + }, }; static int __init mac_sonic_init_module(void) { int err; - if ((err = driver_register(&mac_sonic_driver))) { + if ((err = platform_driver_register(&mac_sonic_driver))) { printk(KERN_ERR "Driver registration failed\n"); return err; } @@ -628,7 +629,7 @@ out_unregister: static void __exit mac_sonic_cleanup_module(void) { - driver_unregister(&mac_sonic_driver); + platform_driver_unregister(&mac_sonic_driver); if (mac_sonic_device) { platform_device_unregister(mac_sonic_device); |