From: Henne <henne@nachtwindheim.de>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH] cleanup of PCIE-portbus driver
Date: Tue, 25 Apr 2006 07:09:41 +0000 [thread overview]
Message-ID: <444DCB35.1060208@nachtwindheim.de> (raw)
From: Henrik Kretzschmar <henne@nachtwindheim.de>
Marking the pci_device_id table of portdrv_pci.c as __devinitdata and
making save/resore_config() dependend to 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/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
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
next reply other threads:[~2006-04-25 7:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-25 7:09 Henne [this message]
2006-04-25 21:16 ` [KJ] [PATCH] cleanup of PCIE-portbus driver Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=444DCB35.1060208@nachtwindheim.de \
--to=henne@nachtwindheim.de \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.