summaryrefslogtreecommitdiff
path: root/drivers/pci
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2014-09-23 17:02:42 (GMT)
committerMatthew Weigel <Matthew.Weigel@freescale.com>2014-12-11 18:37:05 (GMT)
commitc6e5e81662b199625ab309b37f7cb062ca716c43 (patch)
tree4a9fc381a95904ebc73f889c9e9cedab322f2901 /drivers/pci
parenta600e1b99486f180401264944c534c151b87e4c8 (diff)
downloadlinux-fsl-qoriq-c6e5e81662b199625ab309b37f7cb062ca716c43.tar.xz
PCI/MSI: Remove "pos" from the struct msi_desc msi_attrib
"msi_attrib.pos" is only used for MSI (not MSI-X), and we already cache the MSI capability offset in "dev->msi_cap". Remove "pos" from the struct msi_attrib and use "dev->msi_cap" directly. [bhelgaas: changelog, fix whitespace] Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> The patch is part of: https://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/commit/?h=next&id=d591f2eeaf13bc6759069f14b6bf1b1ada116774 Change-Id: Ib04e9b6db0c44b4d8e003fadd25e2f14e071c39c Reviewed-on: http://git.am.freescale.net:8181/19706 Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Zhengxiong Jin <Jason.Jin@freescale.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/host/pcie-designware.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 1c59e4e..8a01ea9 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -343,9 +343,8 @@ static int dw_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
struct msi_msg msg;
struct pcie_port *pp = sys_to_pcie(pdev->bus->sysdata);
- pci_read_config_word(pdev, desc->msi_attrib.pos+PCI_MSI_FLAGS,
- &msg_ctr);
- msgvec = (msg_ctr&PCI_MSI_FLAGS_QSIZE) >> 4;
+ pci_read_config_word(pdev, pdev->msi_cap + PCI_MSI_FLAGS, &msg_ctr);
+ msgvec = (msg_ctr & PCI_MSI_FLAGS_QSIZE) >> 4;
if (msgvec == 0)
msgvec = (msg_ctr & PCI_MSI_FLAGS_QMASK) >> 1;
if (msgvec > 5)