* [PATCH] mem driver: fix conditional on isa i/o support
@ 2006-08-30 2:02 Geoff Levand
2006-08-30 19:38 ` Linas Vepstas
0 siblings, 1 reply; 2+ messages in thread
From: Geoff Levand @ 2006-08-30 2:02 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel, linas
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>
---
I've only tested this on powerpc (cell) build. Testing
on other arch's would be welcome.
-Geoff
Index: cell--common--4/drivers/char/mem.c
===================================================================
--- cell--common--4.orig/drivers/char/mem.c
+++ cell--common--4/drivers/char/mem.c
@@ -522,7 +522,7 @@
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,
size_t count, loff_t *ppos)
{
@@ -799,7 +799,7 @@
.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 = {
.llseek = memory_lseek,
.read = read_port,
@@ -869,7 +869,7 @@
case 3:
filp->f_op = &null_fops;
break;
-#if defined(CONFIG_ISA) || !defined(__mc68000__)
+#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
case 4:
filp->f_op = &port_fops;
break;
@@ -916,7 +916,7 @@
{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(__mc68000__)
+#if (defined(CONFIG_ISA) || defined(CONFIG_PCI)) && !defined(__mc68000__)
{4, "port", S_IRUSR | S_IWUSR | S_IRGRP, &port_fops},
#endif
{5, "zero", S_IRUGO | S_IWUGO, &zero_fops},
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] mem driver: fix conditional on isa i/o support
2006-08-30 2:02 [PATCH] mem driver: fix conditional on isa i/o support Geoff Levand
@ 2006-08-30 19:38 ` Linas Vepstas
0 siblings, 0 replies; 2+ messages in thread
From: Linas Vepstas @ 2006-08-30 19:38 UTC (permalink / raw)
To: Geoff Levand; +Cc: akpm, linux-kernel
On Tue, Aug 29, 2006 at 07:02:33PM -0700, Geoff Levand wrote:
> 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>
Discussd very breifly on ppc64 mailing list, seems to be
the right thing to do.
Acked-by: Linas Vepstas <lins@austin.ibm.com>
--linas
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-08-30 19:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-30 2:02 [PATCH] mem driver: fix conditional on isa i/o support Geoff Levand
2006-08-30 19:38 ` Linas Vepstas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox