Commit 153dcc54 authored by Geoff Levand's avatar Geoff Levand Committed by Linus Torvalds

[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: default avatarGeoff Levand <geoffrey.levand@am.sony.com>
Acked-by: default avatarLinas Vepstas <lins@austin.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 781b823e
...@@ -551,7 +551,7 @@ static ssize_t write_kmem(struct file * file, const char __user * buf, ...@@ -551,7 +551,7 @@ static ssize_t write_kmem(struct file * file, const char __user * buf,
return virtr + wrote; return virtr + wrote;
} }
#if defined(CONFIG_ISA) || !defined(__mc68000__) #if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
static ssize_t read_port(struct file * file, char __user * buf, static ssize_t read_port(struct file * file, char __user * buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
...@@ -830,7 +830,7 @@ static const struct file_operations null_fops = { ...@@ -830,7 +830,7 @@ static const struct file_operations null_fops = {
.splice_write = splice_write_null, .splice_write = splice_write_null,
}; };
#if defined(CONFIG_ISA) || !defined(__mc68000__) #if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
static const struct file_operations port_fops = { static const struct file_operations port_fops = {
.llseek = memory_lseek, .llseek = memory_lseek,
.read = read_port, .read = read_port,
...@@ -908,7 +908,7 @@ static int memory_open(struct inode * inode, struct file * filp) ...@@ -908,7 +908,7 @@ static int memory_open(struct inode * inode, struct file * filp)
case 3: case 3:
filp->f_op = &null_fops; filp->f_op = &null_fops;
break; break;
#if defined(CONFIG_ISA) || !defined(__mc68000__) #if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
case 4: case 4:
filp->f_op = &port_fops; filp->f_op = &port_fops;
break; break;
...@@ -955,7 +955,7 @@ static const struct { ...@@ -955,7 +955,7 @@ static const struct {
{1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops}, {1, "mem", S_IRUSR | S_IWUSR | S_IRGRP, &mem_fops},
{2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops}, {2, "kmem", S_IRUSR | S_IWUSR | S_IRGRP, &kmem_fops},
{3, "null", S_IRUGO | S_IWUGO, &null_fops}, {3, "null", S_IRUGO | S_IWUGO, &null_fops},
#if defined(CONFIG_ISA) || !defined(__mc68000__) #if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
{4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops}, {4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
#endif #endif
{5, "zero", S_IRUGO | S_IWUGO, &zero_fops}, {5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment