aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2006-09-29 05:01:23 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:22 -0400
commit153dcc54df826d2f8413c026313cba673c6bcc5b (patch)
treeed9c7ecd2f9f3d44990a3a501008b3d5804bbf14
parent781b823e093b6ab3fd489f7d56ed869d27a78c1d (diff)
[PATCH] mem driver: fix conditional on isa i/o support
This change corrects the logic on the preprocessor conditionals that include support for ISA port i/o (/dev/ioports) into the mem character driver. This fixes the following error when building for powerpc platforms with CONFIG_PCI=n. drivers/built-in.o: undefined reference to `pci_io_base' Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Linas Vepstas <lins@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/char/mem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 4ac70ec697f0..6511012cbdcd 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(__mc68000__) 554#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
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{
@@ -830,7 +830,7 @@ static const struct file_operations null_fops = {
830 .splice_write = splice_write_null, 830 .splice_write = splice_write_null,
831}; 831};
832 832
833#if defined(CONFIG_ISA) || !defined(__mc68000__) 833#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
834static const struct file_operations port_fops = { 834static const struct file_operations port_fops = {
835 .llseek = memory_lseek, 835 .llseek = memory_lseek,
836 .read = read_port, 836 .read = read_port,
@@ -908,7 +908,7 @@ static int memory_open(struct inode * inode, struct file * filp)
908 case 3: 908 case 3:
909 filp->f_op = &null_fops; 909 filp->f_op = &null_fops;
910 break; 910 break;
911#if defined(CONFIG_ISA) || !defined(__mc68000__) 911#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
912 case 4: 912 case 4:
913 filp->f_op = &port_fops; 913 filp->f_op = &port_fops;
914 break; 914 break;
@@ -955,7 +955,7 @@ static const struct {
955 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops}, 955 {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
956 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops}, 956 {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
957 {3, "null", S_IRUGO | S_IWUGO, &null_fops}, 957 {3, "null", S_IRUGO | S_IWUGO, &null_fops},
958#if defined(CONFIG_ISA) || !defined(__mc68000__) 958#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
959 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops}, 959 {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
960#endif 960#endif
961 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops}, 961 {5, "zero", S_IRUGO | S_IWUGO, &zero_fops},