patch-2.3.36 linux/drivers/net/irda/toshoboe.c

Next file: linux/drivers/net/irda/w83977af_ir.c
Previous file: linux/drivers/net/irda/pc87108.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.35/linux/drivers/net/irda/toshoboe.c linux/drivers/net/irda/toshoboe.c
@@ -87,7 +87,7 @@
 /* No user servicable parts below here */
 
 #include <linux/module.h>
-
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/skbuff.h>
@@ -702,8 +702,6 @@
 	  rtnl_lock();
 	  unregister_netdevice(self->netdev);
 	  rtnl_unlock();
-	  /* Must free the old-style 2.2.x device */
-	  kfree(self->netdev);
   }
 
   kfree (self->taskfilebuf);
@@ -872,8 +870,6 @@
 	  ERROR(__FUNCTION__ "(), dev_alloc() failed!\n");
 	  return -ENOMEM;
   }
-  /* dev_alloc doesn't clear the struct, so lets do a little hack */
-  memset(((__u8*)dev)+sizeof(char*),0,sizeof(struct net_device)-sizeof(char*));
 
   dev->priv = (void *) self;
   self->netdev = dev;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)