]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/wan/sbni.c
Merge branch 'linus' into x86/irqstats
[linux-2.6-omap-h63xx.git] / drivers / net / wan / sbni.c
index 1cc18e787a65e4c39dc8e0e1fff2eed027d1ab6c..e59255a155a91e34719b11e70c9a471d4fd36e6d 100644 (file)
@@ -54,6 +54,7 @@
 #include <linux/init.h>
 #include <linux/delay.h>
 
+#include <net/net_namespace.h>
 #include <net/arp.h>
 
 #include <asm/io.h>
@@ -215,8 +216,6 @@ static void __init sbni_devsetup(struct net_device *dev)
        dev->get_stats          = &sbni_get_stats;
        dev->set_multicast_list = &set_multicast_list;
        dev->do_ioctl           = &sbni_ioctl;
-
-       SET_MODULE_OWNER( dev );
 }
 
 int __init sbni_probe(int unit)
@@ -392,8 +391,8 @@ sbni_probe1( struct net_device  *dev,  unsigned long  ioaddr,  int  irq )
        spin_lock_init( &nl->lock );
 
        /* store MAC address (generate if that isn't known) */
-       *(u16 *)dev->dev_addr = htons( 0x00ff );
-       *(u32 *)(dev->dev_addr + 2) = htonl( 0x01000000 |
+       *(__be16 *)dev->dev_addr = htons( 0x00ff );
+       *(__be32 *)(dev->dev_addr + 2) = htonl( 0x01000000 |
                ( (mac[num]  ?  mac[num]  :  (u32)((long)dev->priv)) & 0x00ffffff) );
 
        /* store link settings (speed, receive level ) */
@@ -503,8 +502,8 @@ sbni_start_xmit( struct sk_buff  *skb,  struct net_device  *dev )
 static irqreturn_t
 sbni_interrupt( int  irq,  void  *dev_id )
 {
-       struct net_device         *dev = (struct net_device *) dev_id;
-       struct net_local  *nl  = (struct net_local *) dev->priv;
+       struct net_device         *dev = dev_id;
+       struct net_local  *nl  = dev->priv;
        int     repeat;
 
        spin_lock( &nl->lock );
@@ -752,7 +751,7 @@ upload_data( struct net_device  *dev,  unsigned  framelen,  unsigned  frameno,
 }
 
 
-static __inline void
+static inline void
 send_complete( struct net_local  *nl )
 {
 #ifdef CONFIG_SBNI_MULTILINE
@@ -1361,7 +1360,7 @@ sbni_ioctl( struct net_device  *dev,  struct ifreq  *ifr,  int  cmd )
 
                if (copy_from_user( slave_name, ifr->ifr_data, sizeof slave_name ))
                        return -EFAULT;
-               slave_dev = dev_get_by_name( slave_name );
+               slave_dev = dev_get_by_name(&init_net, slave_name );
                if( !slave_dev  ||  !(slave_dev->flags & IFF_UP) ) {
                        printk( KERN_ERR "%s: trying to enslave non-active "
                                "device %s\n", dev->name, slave_name );