cleaned up a little

This commit is contained in:
cebix 2001-03-28 14:18:58 +00:00
parent d1ea113beb
commit 3c0d6f6e43
2 changed files with 16 additions and 7 deletions

View File

@ -3,7 +3,7 @@
## System specific configuration ## System specific configuration
CC = cc CC = cc
CPPFLAGS = -I. -I/usr/src/linux/include CPPFLAGS = -I. -I/usr/src/linux/include
CFLAGS = -O2 -Wall -fno-builtin -D__KERNEL__ -DMODULE CFLAGS = -O2 -Wall -D__KERNEL__ -DMODULE -DLINUX
ASFLAGS = ASFLAGS =
LDFLAGS = LDFLAGS =
LIBS = LIBS =

View File

@ -18,9 +18,18 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/version.h> #include <linux/version.h>
#ifdef CONFIG_MODVERSIONS
#define MODVERSIONS
#include <linux/modversions.h>
#endif
#ifdef CONFIG_SMP
#define __SMP__
#endif
#include <linux/miscdevice.h> #include <linux/miscdevice.h>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
@ -36,6 +45,9 @@
#include <net/ip.h> #include <net/ip.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
MODULE_AUTHOR("Christian Bauer");
MODULE_DESCRIPTION("Pseudo ethernet device for emulators");
/* Compatibility glue */ /* Compatibility glue */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
#define LINUX_24 #define LINUX_24
@ -138,14 +150,11 @@ int init_module(void)
* Deinitialize module * Deinitialize module
*/ */
int cleanup_module(void) void cleanup_module(void)
{ {
int ret;
/* Unregister driver */ /* Unregister driver */
ret = misc_deregister(&sheep_net_device); misc_deregister(&sheep_net_device);
D(bug("Sheep net driver removed\n")); D(bug("Sheep net driver removed\n"));
return ret;
} }