lkml.org 
[lkml]   [2006]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] no_pci_mem
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>
---

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},
\
 
 \ /
  Last update: 2006-06-16 15:24    [W:0.031 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site