Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4f911d64e04a44c47985be30f978fb3c2efcee0c
Commit:     4f911d64e04a44c47985be30f978fb3c2efcee0c
Parent:     62456726d715042e1976b830c59fd73f41c4aaa6
Author:     Russell King <[EMAIL PROTECTED]>
AuthorDate: Tue May 8 00:28:17 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue May 8 11:15:07 2007 -0700

    Make /dev/port conditional on config symbol
    
    Instead of having /dev/port support dependent in multiple places on a
    string of preprocessor symbols, define a new configuration directive for
    it.  This ensures that all four places remain consistent with each other.
    
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/char/Kconfig |    6 ++++++
 drivers/char/mem.c   |    8 ++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index a26d917..eeb5d96 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -1071,5 +1071,11 @@ config TELCLOCK
          /sys/devices/platform/telco_clock, with a number of files for
          controlling the behavior of this hardware.
 
+config DEVPORT
+       bool
+       depends on !M68K
+       depends on ISA || PCI
+       default y
+
 endmenu
 
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 2c6fc50..cc9a9d0 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -551,7 +551,7 @@ static ssize_t write_kmem(struct file * file, const char 
__user * buf,
        return virtr + wrote;
 }
 
-#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
+#ifdef CONFIG_DEVPORT
 static ssize_t read_port(struct file * file, char __user * buf,
                         size_t count, loff_t *ppos)
 {
@@ -834,7 +834,7 @@ static const struct file_operations null_fops = {
        .splice_write   = splice_write_null,
 };
 
-#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
+#ifdef CONFIG_DEVPORT
 static const struct file_operations port_fops = {
        .llseek         = memory_lseek,
        .read           = read_port,
@@ -912,7 +912,7 @@ static int memory_open(struct inode * inode, struct file * 
filp)
                case 3:
                        filp->f_op = &null_fops;
                        break;
-#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
+#ifdef CONFIG_DEVPORT
                case 4:
                        filp->f_op = &port_fops;
                        break;
@@ -959,7 +959,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(CONFIG_PCI)) && !defined(__mc68000__)
+#ifdef CONFIG_DEVPORT
        {4, "port",    S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
 #endif
        {5, "zero",    S_IRUGO | S_IWUGO,           &zero_fops},
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to