Re: [PATCH 2.6.13-rc2] pci: fix PCI && !HOTPLUG compile error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 06, 2005 at 05:02:41PM +0200, Mikael Pettersson wrote:
> 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.

No, use this patch instead, it's smaller and cleaner, and is what I ment
the code to look like in the first place :)

thanks,

greg k-h

Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 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
  *


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux