summaryrefslogtreecommitdiff
path: root/drivers/pci/pcie/portdrv.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-01-13 13:38:34 (GMT)
committerJesse Barnes <jbarnes@hobbes.lan>2009-03-20 02:29:20 (GMT)
commit1bf83e558cb29d163f4bc6decbc3800ecf4db195 (patch)
treeccbf5bc39973a438f69fbd39317ef49a974c76ad /drivers/pci/pcie/portdrv.h
parente496b617b40f2abf6d49803f56aa1344ce1b9177 (diff)
downloadlinux-1bf83e558cb29d163f4bc6decbc3800ecf4db195.tar.xz
PCI: PCIe portdrv: Use driver data to simplify code
PCI Express port driver extension, as defined by struct pcie_port_device_ext in portdrv.h, is allocated and initialized, but never used (it also is never freed). Extend it to hold the PCI Express port type as well as the port interrupt mode, change its name and use it to simplify the code in portdrv_core.c . Additionally, remove the redundant interrupt_mode member of struct pcie_device defined in include/linux/pcieport_if.h . Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pcie/portdrv.h')
-rw-r--r--drivers/pci/pcie/portdrv.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/pcie/portdrv.h b/drivers/pci/pcie/portdrv.h
index 2529f3f..b0dcbc7 100644
--- a/drivers/pci/pcie/portdrv.h
+++ b/drivers/pci/pcie/portdrv.h
@@ -28,8 +28,9 @@
#define get_descriptor_id(type, service) (((type - 4) << 4) | service)
-struct pcie_port_device_ext {
- int interrupt_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */
+struct pcie_port_data {
+ int port_type; /* Type of the port */
+ int port_irq_mode; /* [0:INTx | 1:MSI | 2:MSI-X] */
};
extern struct bus_type pcie_port_bus_type;