aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/Kconfig6
-rw-r--r--drivers/char/mem.c8
2 files changed, 10 insertions, 4 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig
index a26d91743b24..eeb5d9693aba 100644
--- a/drivers/char/Kconfig
+++ b/drivers/char/Kconfig
@@ -1071,5 +1071,11 @@ config TELCLOCK
1071 /sys/devices/platform/telco_clock, with a number of files for 1071 /sys/devices/platform/telco_clock, with a number of files for
1072 controlling the behavior of this hardware. 1072 controlling the behavior of this hardware.
1073 1073
1074config DEVPORT
1075 bool
1076 depends on !M68K
1077 depends on ISA || PCI
1078 default y
1079
1074endmenu 1080endmenu
1075 1081
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 2c6fc505cc3c..cc9a9d0df979 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,
551 return virtr + wrote; 551 return virtr + wrote;
552} 552}
553 553
554#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__) 554#ifdef CONFIG_DEVPORT
555static ssize_t read_port(struct file * file, char __user * buf, 555static ssize_t read_port(struct file * file, char __user * buf,
556 size_t count, loff_t *ppos) 556 size_t count, loff_t *ppos)
557{ 557{
@@ -834,7 +834,7 @@ static const struct file_operations null_fops = {
834 .splice_write = splice_write_null, 834 .splice_write = splice_write_null,
835}; 835};
836 836
837#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__) 837#ifdef CONFIG_DEVPORT
838static const struct file_operations port_fops = { 838static const struct file_operations port_fops = {
839 .llseek = memory_lseek, 839 .llseek = memory_lseek,
840 .read = read_port, 840 .read = read_port,
@@ -912,7 +912,7 @@ static int memory_open(struct inode * inode, struct file * filp)
912 case 3: 912 case 3:
913 filp->f_op = &null_fops; 913 filp->f_op = &null_fops;
914 break; 914 break;
915#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__) 915#ifdef CONFIG_DEVPORT
916 case 4: 916 case 4:
917 filp->f_op = &port_fops; 917 filp->f_op = &port_fops;
918 break; 918 break;
@@ -959,7 +959,7 @@ static const struct {
959 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops}, 959 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
960 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops}, 960 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
961 {3, "null", S_IRUGO | S_IWUGO, &null_fops}, 961 {3, "null", S_IRUGO | S_IWUGO, &null_fops},
962#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__) 962#ifdef CONFIG_DEVPORT
963 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops}, 963 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
964#endif 964#endif
965 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops}, 965 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops},