* [PATCH] no_pci_mem
@ 2006-06-16 15:21 Milan Svoboda
0 siblings, 0 replies; only message in thread
From: Milan Svoboda @ 2006-06-16 15:21 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
From: Milan Svoboda <msvoboda@ra.rockwell.com>
This patch disables port subdevice when pci or isa bus is not selected.
Current behaviour is that port is disabled only when there is no isa bus.
Feedback and comments are highly appreciated.
This patch is against 2.6.17-rc5.
Please CC me, I'm not subscribed to the mailing list.
Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com>
---
[-- Attachment #2: no_pci_mem.patch --]
[-- Type: text/plain, Size: 1694 bytes --]
diff -uprN -X orig.bak.never.touch/Documentation/dontdiff orig.bak.never.touch/drivers/char/mem.c new_gadget.newest/drivers/char/mem.c
--- orig.bak.never.touch/drivers/char/mem.c 2006-05-30 09:37:37.000000000 +0000
+++ new_gadget.newest/drivers/char/mem.c 2006-06-14 12:14:42.000000000 +0000
@@ -524,7 +524,7 @@ static ssize_t write_kmem(struct file *
return virtr + wrote;
}
-#if defined(CONFIG_ISA) || !defined(__mc68000__)
+#if !defined(__mc68000__) && (defined(CONFIG_PCI) || defined(CONFIG_ISA))
static ssize_t read_port(struct file * file, char __user * buf,
size_t count, loff_t *ppos)
{
@@ -801,7 +801,7 @@ static struct file_operations null_fops
.splice_write = splice_write_null,
};
-#if defined(CONFIG_ISA) || !defined(__mc68000__)
+#if !defined(__mc68000__) && (defined(CONFIG_PCI) || defined(CONFIG_ISA))
static struct file_operations port_fops = {
.llseek = memory_lseek,
.read = read_port,
@@ -871,7 +871,7 @@ static int memory_open(struct inode * in
case 3:
filp->f_op = &null_fops;
break;
-#if defined(CONFIG_ISA) || !defined(__mc68000__)
+#if !defined(__mc68000__) && (defined(CONFIG_PCI) || defined(CONFIG_ISA))
case 4:
filp->f_op = &port_fops;
break;
@@ -918,7 +918,7 @@ static const struct {
{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__)
+#if !defined(__mc68000__) && (defined(CONFIG_PCI) || defined(CONFIG_ISA))
{4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
#endif
{5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-16 13:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-16 15:21 [PATCH] no_pci_mem Milan Svoboda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox