mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Fix 2.6.13rc2 compilation without CONFIG_HOTPLUG
@ 2005-07-06 11:23 Andi Kleen
  2005-07-06 16:12 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2005-07-06 11:23 UTC (permalink / raw)
  To: torvalds, linux-kernel, gregkh


Otherwise PCI won't compile.

Signed-off-by: Andi Kleen <ak@suse.de>

Index: linux/drivers/pci/pci-driver.c
===================================================================
--- linux.orig/drivers/pci/pci-driver.c
+++ linux/drivers/pci/pci-driver.c
@@ -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  /* A kingdom for C99 */
 	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;
 }
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix 2.6.13rc2 compilation without CONFIG_HOTPLUG
  2005-07-06 11:23 [PATCH] Fix 2.6.13rc2 compilation without CONFIG_HOTPLUG Andi Kleen
@ 2005-07-06 16:12 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2005-07-06 16:12 UTC (permalink / raw)
  To: Andi Kleen; +Cc: torvalds, linux-kernel

On Wed, Jul 06, 2005 at 01:23:54PM +0200, Andi Kleen wrote:
> 
> Otherwise PCI won't compile.
> 
> Signed-off-by: Andi Kleen <ak@suse.de>

No, I like this patch better, it's cleaner and is what I intended the
code to be.  I've already sent it to Linus and the list.

thanks,

greg k-h


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/pci/pci-driver.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

--- gregkh-2.6.orig/drivers/pci/pci-driver.c	2005-07-06 01:03:26.000000000 -0700
+++ gregkh-2.6/drivers/pci/pci-driver.c	2005-07-06 09:07:09.000000000 -0700
@@ -17,13 +17,13 @@
  * Dynamic device IDs are disabled for !CONFIG_HOTPLUG
  */
 
-#ifdef CONFIG_HOTPLUG
-
 struct pci_dynid {
 	struct list_head node;
 	struct pci_device_id id;
 };
 
+#ifdef CONFIG_HOTPLUG
+
 /**
  * store_new_id
  *

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-07  2:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-06 11:23 [PATCH] Fix 2.6.13rc2 compilation without CONFIG_HOTPLUG Andi Kleen
2005-07-06 16:12 ` Greg KH

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®