Update of /cvsroot/linuxconsole/ruby/linux/drivers/char
In directory usw-pr-cvs1:/tmp/cvs-serv24675
Modified Files:
misc.c mem.c
Log Message:
Synced more files.
Index: misc.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/misc.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- misc.c 21 May 2002 04:06:05 -0000 1.18
+++ misc.c 30 Oct 2002 16:54:34 -0000 1.19
@@ -277,7 +277,7 @@
#ifdef CONFIG_I8K
i8k_init();
#endif
- if (devfs_register_chrdev(MISC_MAJOR,"misc",&misc_fops)) {
+ if (register_chrdev(MISC_MAJOR,"misc",&misc_fops)) {
printk("unable to get major %d for misc devices\n",
MISC_MAJOR);
return -EIO;
Index: mem.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/mem.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- mem.c 16 Apr 2002 17:41:49 -0000 1.22
+++ mem.c 30 Oct 2002 16:54:34 -0000 1.23
@@ -204,6 +204,9 @@
return 0;
}
+extern long vread(char *buf, char *addr, unsigned long count);
+extern long vwrite(char *buf, char *addr, unsigned long count);
+
/*
* This function reads the *virtual* memory as seen by the kernel.
*/
@@ -267,8 +270,6 @@
return virtr + read;
}
-extern long vwrite(char *buf, char *addr, unsigned long count);
-
/*
* This function writes to the *virtual* memory as seen by the kernel.
*/
@@ -318,7 +319,7 @@
return virtr + wrote;
}
-#if !defined(__mc68000__)
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
static ssize_t read_port(struct file * file, char * buf,
size_t count, loff_t *ppos)
{
@@ -551,7 +552,7 @@
write: write_null,
};
-#if !defined(__mc68000__)
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
static struct file_operations port_fops = {
llseek: memory_lseek,
read: read_port,
@@ -585,7 +586,7 @@
case 3:
filp->f_op = &null_fops;
break;
-#if !defined(__mc68000__)
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
case 4:
filp->f_op = &port_fops;
break;
@@ -622,7 +623,9 @@
{1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
{2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
{3, "null", S_IRUGO | S_IWUGO, &null_fops},
+#if defined(CONFIG_ISA) || !defined(__mc68000__)
{4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
+#endif
{5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
{7, "full", S_IRUGO | S_IWUGO, &full_fops},
{8, "random", S_IRUGO | S_IWUSR, &random_fops},
@@ -643,7 +646,7 @@
int __init chr_dev_init(void)
{
- if (devfs_register_chrdev(MEM_MAJOR,"mem",&memory_fops))
+ if (register_chrdev(MEM_MAJOR,"mem",&memory_fops))
printk("unable to get major %d for memory devs\n", MEM_MAJOR);
memory_devfs_register();
rand_initialize();
|