public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Milan Svoboda <msvoboda@ra.rockwell.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] no_pci_mem
Date: Fri, 16 Jun 2006 15:21:05 +0000	[thread overview]
Message-ID: <4492CC61.1070800@ra.rockwell.com> (raw)

[-- 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},


                 reply	other threads:[~2006-06-16 13:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4492CC61.1070800@ra.rockwell.com \
    --to=msvoboda@ra.rockwell.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox