]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/hostess_sv11.c
Merge branch 'fb' into devel
[linux-2.6-omap-h63xx.git] / drivers / net / wan / hostess_sv11.c
index 9ba3e4ee6ec70c46c537034ce4217191f4b6ffb6..f3065d3473fdc711abc928ef13841c5e754e9ca4 100644 (file)
@@ -75,7 +75,7 @@ static void hostess_input(struct z8530_channel *c, struct sk_buff *skb)
  
 static int hostess_open(struct net_device *d)
 {
-       struct sv11_device *sv11=d->priv;
+       struct sv11_device *sv11=d->ml_priv;
        int err = -1;
        
        /*
@@ -128,7 +128,7 @@ static int hostess_open(struct net_device *d)
 
 static int hostess_close(struct net_device *d)
 {
-       struct sv11_device *sv11=d->priv;
+       struct sv11_device *sv11=d->ml_priv;
        /*
         *      Discard new frames
         */
@@ -159,14 +159,14 @@ static int hostess_close(struct net_device *d)
 
 static int hostess_ioctl(struct net_device *d, struct ifreq *ifr, int cmd)
 {
-       /* struct sv11_device *sv11=d->priv;
+       /* struct sv11_device *sv11=d->ml_priv;
           z8530_ioctl(d,&sv11->sync.chanA,ifr,cmd) */
        return sppp_do_ioctl(d, ifr,cmd);
 }
 
 static struct net_device_stats *hostess_get_stats(struct net_device *d)
 {
-       struct sv11_device *sv11=d->priv;
+       struct sv11_device *sv11=d->ml_priv;
        if(sv11)
                return z8530_get_stats(&sv11->sync.chanA);
        else
@@ -179,7 +179,7 @@ static struct net_device_stats *hostess_get_stats(struct net_device *d)
  
 static int hostess_queue_xmit(struct sk_buff *skb, struct net_device *d)
 {
-       struct sv11_device *sv11=d->priv;
+       struct sv11_device *sv11=d->ml_priv;
        return z8530_queue_xmit(&sv11->sync.chanA, skb);
 }
 
@@ -231,19 +231,16 @@ static struct sv11_device *sv11_init(int iobase, int irq)
                return NULL;
        }
        
-       sv = kmalloc(sizeof(struct sv11_device), GFP_KERNEL);
+       sv = kzalloc(sizeof(struct sv11_device), GFP_KERNEL);
        if(!sv)
                goto fail3;
                        
-       memset(sv, 0, sizeof(*sv));
        sv->if_ptr=&sv->netdev;
        
        sv->netdev.dev = alloc_netdev(0, "hdlc%d", sv11_setup);
        if(!sv->netdev.dev)
                goto fail2;
 
-       SET_MODULE_OWNER(sv->netdev.dev);
-
        dev=&sv->sync;
        
        /*
@@ -328,6 +325,7 @@ static struct sv11_device *sv11_init(int iobase, int irq)
                /* 
                 *      Initialise the PPP components
                 */
+               d->ml_priv = sv;
                sppp_attach(&sv->netdev);
                
                /*
@@ -336,7 +334,6 @@ static struct sv11_device *sv11_init(int iobase, int irq)
                
                d->base_addr = iobase;
                d->irq = irq;
-               d->priv = sv;
                
                if(register_netdev(d))
                {