/**
  *
  * module_bs1.c:
  * simple example module, how to use standard kernel definitions for symbol-export
  * how to do symbol-import, init- and cleanup-function
  *
  */

#include <linux/version.h>
#include <linux/modversions.h>
#include <linux/config.h>
/*
EXPORT_SYMTAB;          */ /* if this module wants to export some things */
/* default behaviour for kernel modules is export ALL GLOBAL symbols */
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/init.h>



int ioport=0;
int dma=1;
MODULE_AUTHOR("Carsten Busse");
MODULE_PARM(ioport,"i");
MODULE_PARM_DESC(ioport,"The base port for a hypothetical BS-device (default 0)");
MODULE_PARM(dma,"i");
MODULE_PARM_DESC(dma,"The DMA-Adress for a hypothetical BS-device (default 1)");

/**
  * Variables and Methods for external access
  */

char* info="Huhu, irgendwas muss hier ja mal was drinstehen";
/*
EXPORT_SYMBOL(info);
EXPORT_SYMBOL(module_sampleopenmethod);
EXPORT_SYMBOL(module_sampleclosemethod);
*/

/**
  * Source Code for Module
  */

int module_sampleopenmethod() {
    if (MOD_IN_USE) return -1;
    MOD_INC_USE_COUNT;
}

void module_sampleclosemethod() {
    MOD_DEC_USE_COUNT;
}


int module_start(void) {
    printk("<1>Sample Module BS1 loaded into kernel...\n");
    return 0;  /* always successfull for this example */
}

void module_stop(void) {
    printk("<1>Sample Module BS1 unloaded from kernel...\n");
}

module_init(module_start);
module_exit(module_stop);
