public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 2.5] PCI: fix non-hotplug build
@ 2003-06-21 12:59 Ivan Kokshaysky
  2003-06-23  2:44 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Ivan Kokshaysky @ 2003-06-21 12:59 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

Current BK won't build when CONFIG_HOTPLUG is not set due to
undefined references to pci_destroy_dev in hotplug.c.
I think it makes sense to not compile hotplug.c in this case at all.
Also, this allows to get rid of several function which are unused
in non-hotplug kernel.

Tested on Alpha.

Ivan.

--- 2.5/drivers/pci/Makefile	Tue Jun 17 08:20:22 2003
+++ linux/drivers/pci/Makefile	Sat Jun 21 16:53:28 2003
@@ -3,14 +3,15 @@
 #
 
 obj-y		+= access.o bus.o probe.o pci.o pool.o quirks.o \
-			names.o pci-driver.o search.o hotplug.o \
-			pci-sysfs.o
+			names.o pci-driver.o search.o pci-sysfs.o
 obj-$(CONFIG_PM)  += power.o
 obj-$(CONFIG_PROC_FS) += proc.o
 
 ifndef CONFIG_SPARC64
 obj-$(CONFIG_PCI) += setup-res.o
 endif
+
+obj-$(CONFIG_HOTPLUG) += hotplug.o
 
 # Build the PCI Hotplug drivers if we were asked to
 obj-$(CONFIG_HOTPLUG_PCI) += hotplug/
--- 2.5/drivers/pci/pci-driver.c	Sat Jun 21 15:22:41 2003
+++ linux/drivers/pci/pci-driver.c	Sat Jun 21 16:21:38 2003
@@ -486,6 +486,14 @@ void pci_dev_put(struct pci_dev *dev)
 		put_device(&dev->dev);
 }
 
+#ifndef CONFIG_HOTPLUG
+int pci_hotplug (struct device *dev, char **envp, int num_envp,
+		 char *buffer, int buffer_size)
+{
+	return -ENODEV;
+}
+#endif
+
 struct bus_type pci_bus_type = {
 	.name		= "pci",
 	.match		= pci_bus_match,
--- 2.5/drivers/pci/hotplug.c	Sat Jun 21 15:22:40 2003
+++ linux/drivers/pci/hotplug.c	Sat Jun 21 16:19:49 2003
@@ -12,7 +12,6 @@
 
 static void pci_free_resources(struct pci_dev *dev);
 
-#ifdef CONFIG_HOTPLUG
 int pci_hotplug (struct device *dev, char **envp, int num_envp,
 		 char *buffer, int buffer_size)
 {
@@ -209,16 +208,6 @@ int pci_remove_device_safe(struct pci_de
 }
 EXPORT_SYMBOL(pci_remove_device_safe);
 
-#else /* CONFIG_HOTPLUG */
-
-int pci_hotplug (struct device *dev, char **envp, int num_envp,
-		 char *buffer, int buffer_size)
-{
-	return -ENODEV;
-}
-
-#endif /* CONFIG_HOTPLUG */
-
 static void
 pci_free_resources(struct pci_dev *dev)
 {
@@ -283,7 +272,5 @@ void pci_remove_behind_bridge(struct pci
 	}
 }
 
-#ifdef CONFIG_HOTPLUG
 EXPORT_SYMBOL(pci_remove_bus_device);
 EXPORT_SYMBOL(pci_remove_behind_bridge);
-#endif

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

* Re: [patch 2.5] PCI: fix non-hotplug build
  2003-06-21 12:59 [patch 2.5] PCI: fix non-hotplug build Ivan Kokshaysky
@ 2003-06-23  2:44 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-06-23  2:44 UTC (permalink / raw)
  To: Ivan Kokshaysky; +Cc: linux-kernel

On Sat, Jun 21, 2003 at 04:59:48PM +0400, Ivan Kokshaysky wrote:
> Current BK won't build when CONFIG_HOTPLUG is not set due to
> undefined references to pci_destroy_dev in hotplug.c.
> I think it makes sense to not compile hotplug.c in this case at all.
> Also, this allows to get rid of several function which are unused
> in non-hotplug kernel.
> 
> Tested on Alpha.

Applied, thanks.

greg k-h

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

end of thread, other threads:[~2003-06-23  2:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-21 12:59 [patch 2.5] PCI: fix non-hotplug build Ivan Kokshaysky
2003-06-23  2:44 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox