Skip to contentSkip to conversation

drivers/pci/hotplug/ : simply use MODULE

PATCH Applied Adrian Bunk 3 participants 3 messages Dec 11, 2004 – Dec 17, 2004

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/pci/hotplug/ : simply use MODULE

The patch below lets five files under drivers/pci/hotplug/ simply use MODULE to check whether they are compiled as part of a module.

MODULE is the common idiom for checking whether a file is built as part of a module.

In theory, my patch shouldn't have made any difference, but if you look closely, the previous #if's in cpcihp_generic.c and cpci_hotplug_pci.c weren't correct.

diffstat output:

 drivers/pci/hotplug/cpci_hotplug_pci.c |    2 +-
 drivers/pci/hotplug/cpcihp_generic.c   |    2 +-
 drivers/pci/hotplug/fakephp.c          |    2 +-
 drivers/pci/hotplug/ibmphp.h           |    2 +-
 drivers/pci/hotplug/shpchp.h           |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/pci/hotplug/ibmphp.h renamed from drivers/pci/hotplug/ibmphp.h.old +1 -1
@@ -34,7 +34,7 @@
 
 extern int ibmphp_debug;
 
-#if !defined(CONFIG_HOTPLUG_PCI_IBM_MODULE)
+#if !defined(MODULE)
 	#define MY_NAME "ibmphpd"
 #else
 	#define MY_NAME THIS_MODULE->name
drivers/pci/hotplug/cpcihp_generic.c renamed from drivers/pci/hotplug/cpcihp_generic.c.old +1 -1
@@ -45,7 +45,7 @@
 #define DRIVER_AUTHOR	"Scott Murray <[email protected]>"
 #define DRIVER_DESC	"Generic port I/O CompactPCI Hot Plug Driver"
 
-#if !defined(CONFIG_HOTPLUG_CPCI_GENERIC_MODULE)
+#if !defined(MODULE)
 #define MY_NAME	"cpcihp_generic"
 #else
 #define MY_NAME	THIS_MODULE->name
drivers/pci/hotplug/cpci_hotplug_pci.c renamed from drivers/pci/hotplug/cpci_hotplug_pci.c.old +1 -1
@@ -32,7 +32,7 @@
 #include "pci_hotplug.h"
 #include "cpci_hotplug.h"
 
-#if !defined(CONFIG_HOTPLUG_CPCI_MODULE)
+#if !defined(MODULE)
 #define MY_NAME	"cpci_hotplug"
 #else
 #define MY_NAME	THIS_MODULE->name
drivers/pci/hotplug/fakephp.c renamed from drivers/pci/hotplug/fakephp.c.old +1 -1
@@ -40,7 +40,7 @@
 #include "pci_hotplug.h"
 #include "../pci.h"
 
-#if !defined(CONFIG_HOTPLUG_PCI_FAKE_MODULE)
+#if !defined(MODULE)
 	#define MY_NAME	"fakephp"
 #else
 	#define MY_NAME	THIS_MODULE->name
drivers/pci/hotplug/shpchp.h renamed from drivers/pci/hotplug/shpchp.h.old +1 -1
@@ -36,7 +36,7 @@
 #include <asm/io.h>		
 #include "pci_hotplug.h"
 
-#if !defined(CONFIG_HOTPLUG_PCI_SHPC_MODULE)
+#if !defined(MODULE)
 	#define MY_NAME	"shpchp"
 #else
 	#define MY_NAME	THIS_MODULE->name
#1 lore raw
Quoted 9 lines · Adrian Bunk

The patch below lets five files under drivers/pci/hotplug/ simply use MODULE to check whether they are compiled as part of a module.

MODULE is the common idiom for checking whether a file is built as part of a module.

In theory, my patch shouldn't have made any difference, but if you look closely, the previous #if's in cpcihp_generic.c and cpci_hotplug_pci.c weren't correct.

Yep, those were never fixed after the drivers/hotplug to drivers/pci/hotplug move, my bad for not checking things better after that was done.

Thanks,

Scott

Signature · 4 lines
Scott Murray
SOMA Networks, Inc.
Toronto, Ontario
e-mail: [email protected]
Applied
#2 lore raw
In reply to Adrian Bunk
Quoted 9 lines · Adrian Bunk

The patch below lets five files under drivers/pci/hotplug/ simply use MODULE to check whether they are compiled as part of a module.

MODULE is the common idiom for checking whether a file is built as part of a module.

In theory, my patch shouldn't have made any difference, but if you look closely, the previous #if's in cpcihp_generic.c and cpci_hotplug_pci.c weren't correct.

Applied, thanks.

greg k-h