From: Paul Mackerras <paulus@samba.org>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fix pcmcia errors
Date: Fri, 7 Dec 2001 12:10:20 +1100 (EST) [thread overview]
Message-ID: <15376.5884.936760.549470@argo.ozlabs.ibm.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0112061238210.20750-100000@freak.distro.conectiva>
In-Reply-To: <15374.54521.402903.123657@argo.ozlabs.ibm.com> <Pine.LNX.4.21.0112061238210.20750-100000@freak.distro.conectiva>
Marcelo Tosatti writes:
> As David commented, you're using PCI code unconditionally.
>
> Could you please fix that ?
Sure, here is a new patch against 2.4.17-pre5. I tried compiling this
up on an intel box with CONFIG_PCI = n and CONFIG_PCMCIA = y and it
compiled OK. The only change from my last patch is the addition of
#ifdef CONFIG_PCI around the bit that does the
pci_find_parent_resource call.
Thanks,
Paul.
diff -urN linux-2.4.17-pre5/drivers/pcmcia/rsrc_mgr.c pmac/drivers/pcmcia/rsrc_mgr.c
--- linux-2.4.17-pre5/drivers/pcmcia/rsrc_mgr.c Fri Dec 7 07:55:31 2001
+++ pmac/drivers/pcmcia/rsrc_mgr.c Fri Dec 7 08:55:24 2001
@@ -107,17 +107,21 @@
static struct resource *resource_parent(unsigned long b, unsigned long n,
int flags, struct pci_dev *dev)
{
- struct resource res;
+#ifdef CONFIG_PCI
+ struct resource res, *pr;
- if (dev == NULL) {
- if (flags & IORESOURCE_MEM)
- return &iomem_resource;
- return &ioport_resource;
+ if (dev != NULL) {
+ res.start = b;
+ res.end = b + n - 1;
+ res.flags = flags;
+ pr = pci_find_parent_resource(dev, &res);
+ if (pr)
+ return pr;
}
- res.start = b;
- res.end = b + n - 1;
- res.flags = flags;
- return pci_find_parent_resource(dev, &res);
+#endif /* CONFIG_PCI */
+ if (flags & IORESOURCE_MEM)
+ return &iomem_resource;
+ return &ioport_resource;
}
static inline int check_io_resource(unsigned long b, unsigned long n,
prev parent reply other threads:[~2001-12-07 1:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-06 2:16 Paul Mackerras
2001-12-06 14:39 ` Marcelo Tosatti
2001-12-07 1:10 ` Paul Mackerras [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15376.5884.936760.549470@argo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®