* [KJ] [PATCH] Cleanup of portdrv_pci.c
@ 2006-04-24 16:28 Henne
2006-04-24 16:54 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Henne @ 2006-04-24 16:28 UTC (permalink / raw)
To: kernel-janitors
From: Henrik Kretzschmar <henne@nachtwindheim.de>
Marking the pci_device_id table of portdrv_pci.c as __devinitdata and
making save/resore_config() dependend tp CONFIG_PM
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
---
--- 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
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [KJ] [PATCH] Cleanup of portdrv_pci.c
2006-04-24 16:28 [KJ] [PATCH] Cleanup of portdrv_pci.c Henne
@ 2006-04-24 16:54 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2006-04-24 16:54 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 678 bytes --]
On Mon, Apr 24, 2006 at 06:28:29PM +0200, Henne wrote:
> From: Henrik Kretzschmar <henne@nachtwindheim.de>
>
> Marking the pci_device_id table of portdrv_pci.c as __devinitdata and
> making save/resore_config() dependend tp CONFIG_PM
> Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de>
> ---
>
> --- 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
No, please no ifdefs in .c files if you can help it.
thanks,
greg k-h
[-- Attachment #2: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-04-24 16:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-24 16:28 [KJ] [PATCH] Cleanup of portdrv_pci.c Henne
2006-04-24 16:54 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.