From b543c73dc8e5eb47319c723afdb5110877217201 Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 8 May 2007 00:28:17 -0700 Subject: [PATCH] --- yaml --- r: 54639 b: refs/heads/master c: 4f911d64e04a44c47985be30f978fb3c2efcee0c h: refs/heads/master i: 54637: 1b645f37367bebba82bcdeaeb0a7eb0a29622a13 54635: baf468cc90ba419c9d42cd065f54b12768f13077 54631: 8da34c2ced288d702c3edbf21bc303e9e1675d31 54623: 7968207ee75064fa5df05e5f6955fd830ee7dac0 v: v3 --- [refs] | 2 +- trunk/drivers/char/Kconfig | 6 ++++++ trunk/drivers/char/mem.c | 8 ++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index dbd3ac6688e3..403709f15eaa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 62456726d715042e1976b830c59fd73f41c4aaa6 +refs/heads/master: 4f911d64e04a44c47985be30f978fb3c2efcee0c diff --git a/trunk/drivers/char/Kconfig b/trunk/drivers/char/Kconfig index a26d91743b24..eeb5d9693aba 100644 --- a/trunk/drivers/char/Kconfig +++ b/trunk/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/trunk/drivers/char/mem.c b/trunk/drivers/char/mem.c index 2c6fc505cc3c..cc9a9d0df979 100644 --- a/trunk/drivers/char/mem.c +++ b/trunk/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},