libata-sff: port_task is SFF specific
[safe/jmp/linux-2.6] / drivers / net / tokenring / madgemc.c
index 1933081..53f631e 100644 (file)
@@ -21,6 +21,7 @@ static const char version[] = "madgemc.c: v0.91 23/01/2000 by Adam Fritzler\n";
 
 #include <linux/module.h>
 #include <linux/mca.h>
+#include <linux/slab.h>
 #include <linux/kernel.h>
 #include <linux/errno.h>
 #include <linux/init.h>
@@ -142,7 +143,7 @@ static void madgemc_sifwritew(struct net_device *dev, unsigned short val, unsign
        return;
 }
 
-
+static struct net_device_ops madgemc_netdev_ops __read_mostly;
 
 static int __devinit madgemc_probe(struct device *device)
 {      
@@ -168,7 +169,7 @@ static int __devinit madgemc_probe(struct device *device)
                goto getout;
        }
 
-       dev->dma = 0;
+       dev->netdev_ops = &madgemc_netdev_ops;
 
        card = kmalloc(sizeof(struct card_info), GFP_KERNEL);
        if (card==NULL) {
@@ -348,9 +349,6 @@ static int __devinit madgemc_probe(struct device *device)
 
        memcpy(tp->ProductID, "Madge MCA 16/4    ", PROD_ID_SIZE + 1);
 
-       dev->open = madgemc_open;
-       dev->stop = madgemc_close;
-
        tp->tmspriv = card;
        dev_set_drvdata(device, dev);
 
@@ -758,6 +756,10 @@ static struct mca_driver madgemc_driver = {
 
 static int __init madgemc_init (void)
 {
+       madgemc_netdev_ops = tms380tr_netdev_ops;
+       madgemc_netdev_ops.ndo_open = madgemc_open;
+       madgemc_netdev_ops.ndo_stop = madgemc_close;
+
        return mca_register_driver (&madgemc_driver);
 }