cleanup of PCIE-portbus driver
PATCH 1/1 cleanup of PCIE-portbus driver
From: Henrik Kretzschmar <[email protected]>
Marking the pci_device_id table of portdrv_pci.c as __devinitdata and making save/resore_config() dependend to CONFIG_PM
---
--- linux-2.6.17-rc2/drivers/pci/pcie/portdrv_pci.c 2006-04-24
13:31:00.000000000 +0200
+++ linux/drivers/pci/pcie/portdrv_pci.c 2006-04-25 09:04:42.000000000 +0200
@@ -30,23 +30,6 @@
/* global data */
static const char device_name[] = "pcieport-driver";
-static int pcie_portdrv_save_config(struct pci_dev *dev) -{
- return pci_save_state(dev);
-}
-
-static int pcie_portdrv_restore_config(struct pci_dev *dev) -{
- int retval;
-
- pci_restore_state(dev);
- retval = pci_enable_device(dev);
- if (retval)
- return retval;
- pci_set_master(dev);
- return 0;
-}
-
/*
* pcie_portdrv_probe - Probe PCI-Express port devices
* @dev: PCI-Express port device being probed
@@ -86,6 +69,23 @@
}
#ifdef CONFIG_PM
+static int pcie_portdrv_save_config(struct pci_dev *dev)
+{
+ return pci_save_state(dev);
+}
+
+static int pcie_portdrv_restore_config(struct pci_dev *dev)
+{
+ int retval;
+
+ pci_restore_state(dev);
+ retval = pci_enable_device(dev);
+ if (retval)
+ return retval;
+ pci_set_master(dev);
+ return 0;
+}
+
static int pcie_portdrv_suspend (struct pci_dev *dev, pm_message_t state) {
int ret = pcie_port_device_suspend(dev, state);
@@ -105,7 +105,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
Quoted 11 lines · Henne
From: Henrik Kretzschmar <[email protected]>
Marking the
pci_device_idtable ofportdrv_pci.cas__devinitdataand making save/resore_config() dependend toCONFIG_PMSigned-off-by Henrik Kretzschmar <[email protected]>---
---
linux-2.6.17-rc2/drivers/pci/pcie/portdrv_pci.c2006-04-24
13:31:00.000000000 +0200
+++linux/drivers/pci/pcie/portdrv_pci.c2006-04-25
09:04:42.000000000 +0200
All of your patches are line-wrapped and can not be applied :(
thanks,
greg k-h
_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors