#include <linux/time.h>
#include <linux/mm.h>
#include <linux/slab.h>
+#include <linux/devfs_fs_kernel.h>
#include <linux/smp_lock.h>
#include <asm/pgtable.h>
int length;
int end;
+ if (count < 0)
+ return( -EINVAL );
if (!(page = __get_free_page( GFP_KERNEL )))
return( -ENOMEM );
BufferP = SLMBuffer;
SLMState = IDLE;
+ devfs_mk_dir("slm");
+ for (i = 0; i < MAX_SLM; i++) {
+ devfs_mk_cdev(MKDEV(ACSI_MAJOR, i),
+ S_IFCHR|S_IRUSR|S_IWUSR, "slm/%d", i);
+ }
return 0;
}
void cleanup_module(void)
{
+ int i;
+ for (i = 0; i < MAX_SLM; i++)
+ devfs_remove("slm/%d", i);
+ devfs_remove("slm");
if (unregister_chrdev( ACSI_MAJOR, "slm" ) != 0)
printk( KERN_ERR "acsi_slm: cleanup_module failed\n");
atari_stram_free( SLMBuffer );