Skip to contentSkip to conversation

Cleanup of portdrv_pci.c

PATCH In review Henne 2 participants 2 messages Apr 24, 2006 Kernel janitors

lore
Share & tools
lore

Henne

author
#0 lore raw

PATCH 1/1 Cleanup of portdrv_pci.c

From: Henrik Kretzschmar <[email protected]>

Marking the pci_device_id table of portdrv_pci.c as __devinitdata and making save/resore_config() dependend tp CONFIG_PM

---

--- linux-2.6.17-rc2/drivers/pci/pcie/portdrv_pci.c 2006-04-24
13:31:00.000000000 +0200
+++ linux_test/drivers/pci/pcie/portdrv_pci.c 2006-04-24
18:20:29.000000000 +0200
@@ -30,6 +30,7 @@
/* global data */
static const char device_name[] = "pcieport-driver";

+#ifdef CONFIG_PM
static int pcie_portdrv_save_config(struct pci_dev *dev) {
return pci_save_state(dev);
@@ -46,7 +47,7 @@
pci_set_master(dev);
return 0;
}
-
+#endif /* CONFIG_PM */
/*
* pcie_portdrv_probe - Probe PCI-Express port devices
* @dev: PCI-Express port device being probed
@@ -105,7 +106,7 @@
/*
* LINUX Device Driver Model
*/
-static const struct pci_device_id port_pci_ids[] = { { +static const struct pci_device_id port_pci_ids[] __devinitdata= { {
/* handle any PCI-Express port */ PCI_DEVICE_CLASS(((PCI_CLASS_BRIDGE_PCI << 8) | 0x00), ~0), }, { /* end: all zeroes */ }
_______________________________________________
Kernel-janitors mailing list [email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 12 lines · Henne

From: Henrik Kretzschmar <[email protected]>

Marking the pci_device_id table of portdrv_pci.c as __devinitdata and making save/resore_config() dependend tp CONFIG_PM

---

--- linux-2.6.17-rc2/drivers/pci/pcie/portdrv_pci.c 2006-04-24
13:31:00.000000000 +0200
+++ linux_test/drivers/pci/pcie/portdrv_pci.c 2006-04-24
18:20:29.000000000 +0200

Review line 33

Quoted 4 lines
(quoted diff) +1 -0
@@ -30,6 +30,7 @@
 /* global data */
 static const char device_name[] = "pcieport-driver";
 
+#ifdef CONFIG_PM

No, please no ifdefs in .c files if you can help it.

thanks,

greg k-h

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors