From: Mikael Pettersson <mikpe@csd.uu.se>
To: gregkh@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.13-rc2] pci: fix PCI && !HOTPLUG compile error
Date: Wed, 6 Jul 2005 17:02:41 +0200 (MEST) [thread overview]
Message-ID: <200507061502.j66F2f5b010528@harpo.it.uu.se> (raw)
2.6.13-rc2 triggers compile errors in pci-driver.c
when hotplug is disabled:
drivers/pci/pci-driver.c: In function 'pci_match_device':
drivers/pci/pci-driver.c:156: error: dereferencing pointer to incomplete type
drivers/pci/pci-driver.c:156: warning: type defaults to 'int' in declaration of 'type name'
drivers/pci/pci-driver.c:156: error: request for member 'node' in something not a structure or union
drivers/pci/pci-driver.c:156: warning: type defaults to 'int' in declaration of '__mptr'
drivers/pci/pci-driver.c:156: warning: initialization from incompatible pointer type
etc
This is because 2.6.13-rc2 added a code block to this function which references
hotplug-only stuff. Fixed crudely by #ifdef CONFIG_HOTPLUG around it.
Signed-off-by: Mikael Pettersson <mikpe@csd.uu.se>
--- linux-2.6.13-rc2/drivers/pci/pci-driver.c.~1~ 2005-07-06 15:20:41.000000000 +0200
+++ linux-2.6.13-rc2/drivers/pci/pci-driver.c 2005-07-06 15:49:18.000000000 +0200
@@ -145,12 +145,15 @@ const struct pci_device_id *pci_match_de
struct pci_dev *dev)
{
const struct pci_device_id *id;
+#ifdef CONFIG_HOTPLUG
struct pci_dynid *dynid;
+#endif
id = pci_match_id(drv->id_table, dev);
if (id)
return id;
+#ifdef CONFIG_HOTPLUG
/* static ids didn't match, lets look at the dynamic ones */
spin_lock(&drv->dynids.lock);
list_for_each_entry(dynid, &drv->dynids.list, node) {
@@ -160,6 +163,7 @@ const struct pci_device_id *pci_match_de
}
}
spin_unlock(&drv->dynids.lock);
+#endif
return NULL;
}
next reply other threads:[~2005-07-06 19:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-06 15:02 Mikael Pettersson [this message]
2005-07-06 16:11 ` Greg KH
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=200507061502.j66F2f5b010528@harpo.it.uu.se \
--to=mikpe@csd.uu.se \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
/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®