diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 03:22:47 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-02-28 03:22:47 +0300 |
commit | 847f9c606cad121cebf984639e3eeee1c4db82f8 (patch) | |
tree | ecd7aaef6cdfaf908d4d37db2e8f1951b490543a /drivers/net | |
parent | 7981164791d18d5ed1dcdfa9598949ed158a5333 (diff) | |
parent | 00ebfe58b002f0ff387f60c7cd23bc2b274fce1a (diff) | |
download | linux-847f9c606cad121cebf984639e3eeee1c4db82f8.tar.xz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: (24 commits)
m68k: Define sigcontext ABI of ColdFire
m68knommu: NPTL support for uClinux
m68k: Add NPTL support
m68k: Eliminate unused variable in page_to_phys()
m68k: Switch to generic siginfo layout
macfb: fix 24-bit visual and stuff
macfb: cleanup
fbdev: add some missing mac modes
mac68k: start CUDA early
valkyriefb: various fixes
fbdev: mac_var_to_mode() fix
mac68k: move macsonic and macmace platform devices
mac68k: move mac_esp platform device
mac68k: replace mac68k SCC code with platform device
pmac-zilog: add platform driver
pmac-zilog: cleanup
mac68k: rework SWIM platform device
mac68k: cleanup
ataflop: Killl warning about unused variable flags
m68k: Use DIV_ROUND_CLOSEST
...
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/macmace.c | 33 | ||||
-rw-r--r-- | drivers/net/macsonic.c | 33 |
2 files changed, 8 insertions, 58 deletions
diff --git a/drivers/net/macmace.c b/drivers/net/macmace.c index 44f3c2896f20..79408c377875 100644 --- a/drivers/net/macmace.c +++ b/drivers/net/macmace.c @@ -39,7 +39,6 @@ #include "mace.h" static char mac_mace_string[] = "macmace"; -static struct platform_device *mac_mace_device; #define N_TX_BUFF_ORDER 0 #define N_TX_RING (1 << N_TX_BUFF_ORDER) @@ -752,6 +751,7 @@ static irqreturn_t mace_dma_intr(int irq, void *dev_id) MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Macintosh MACE ethernet driver"); +MODULE_ALIAS("platform:macmace"); static int __devexit mac_mace_device_remove (struct platform_device *pdev) { @@ -777,47 +777,22 @@ static struct platform_driver mac_mace_driver = { .probe = mace_probe, .remove = __devexit_p(mac_mace_device_remove), .driver = { - .name = mac_mace_string, + .name = mac_mace_string, + .owner = THIS_MODULE, }, }; static int __init mac_mace_init_module(void) { - int err; - if (!MACH_IS_MAC) return -ENODEV; - if ((err = platform_driver_register(&mac_mace_driver))) { - printk(KERN_ERR "Driver registration failed\n"); - return err; - } - - mac_mace_device = platform_device_alloc(mac_mace_string, 0); - if (!mac_mace_device) - goto out_unregister; - - if (platform_device_add(mac_mace_device)) { - platform_device_put(mac_mace_device); - mac_mace_device = NULL; - } - - return 0; - -out_unregister: - platform_driver_unregister(&mac_mace_driver); - - return -ENOMEM; + return platform_driver_register(&mac_mace_driver); } static void __exit mac_mace_cleanup_module(void) { platform_driver_unregister(&mac_mace_driver); - - if (mac_mace_device) { - platform_device_unregister(mac_mace_device); - mac_mace_device = NULL; - } } module_init(mac_mace_init_module); diff --git a/drivers/net/macsonic.c b/drivers/net/macsonic.c index 875d361fb79d..24109c288108 100644 --- a/drivers/net/macsonic.c +++ b/drivers/net/macsonic.c @@ -62,7 +62,6 @@ #include <asm/mac_via.h> static char mac_sonic_string[] = "macsonic"; -static struct platform_device *mac_sonic_device; #include "sonic.h" @@ -607,6 +606,7 @@ out: MODULE_DESCRIPTION("Macintosh SONIC ethernet driver"); module_param(sonic_debug, int, 0); MODULE_PARM_DESC(sonic_debug, "macsonic debug level (1-4)"); +MODULE_ALIAS("platform:macsonic"); #include "sonic.c" @@ -627,44 +627,19 @@ static struct platform_driver mac_sonic_driver = { .probe = mac_sonic_probe, .remove = __devexit_p(mac_sonic_device_remove), .driver = { - .name = mac_sonic_string, + .name = mac_sonic_string, + .owner = THIS_MODULE, }, }; static int __init mac_sonic_init_module(void) { - int err; - - if ((err = platform_driver_register(&mac_sonic_driver))) { - printk(KERN_ERR "Driver registration failed\n"); - return err; - } - - mac_sonic_device = platform_device_alloc(mac_sonic_string, 0); - if (!mac_sonic_device) - goto out_unregister; - - if (platform_device_add(mac_sonic_device)) { - platform_device_put(mac_sonic_device); - mac_sonic_device = NULL; - } - - return 0; - -out_unregister: - platform_driver_unregister(&mac_sonic_driver); - - return -ENOMEM; + return platform_driver_register(&mac_sonic_driver); } static void __exit mac_sonic_cleanup_module(void) { platform_driver_unregister(&mac_sonic_driver); - - if (mac_sonic_device) { - platform_device_unregister(mac_sonic_device); - mac_sonic_device = NULL; - } } module_init(mac_sonic_init_module); |