diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2014-04-17 16:13:50 +0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-04-17 17:59:24 +0400 |
commit | ccf8f53cac7d9321c9af2b14af41e703f44ac198 (patch) | |
tree | eb0978e74fe30e06d3f292756c562bfc1807edc8 /drivers/ata/ahci.c | |
parent | ab0f9e78b97f5193dd38b3757b42b6fbded05fb7 (diff) | |
download | linux-ccf8f53cac7d9321c9af2b14af41e703f44ac198.tar.xz |
ahci: Use pci_enable_msi_exact() instead of pci_enable_msi_range()
The driver calls pci_enable_msi_range() function with the range of
[nvec..nvec] which is what pci_enable_msi_exact() function is for.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index f6b3e31f63cd..44d40c746982 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1166,7 +1166,7 @@ static inline void ahci_gtf_filter_workaround(struct ata_host *host) static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports, struct ahci_host_priv *hpriv) { - int nvec; + int rc, nvec; if (hpriv->flags & AHCI_HFLAG_NO_MSI) goto intx; @@ -1183,10 +1183,10 @@ static int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports, if (nvec < n_ports) goto single_msi; - nvec = pci_enable_msi_range(pdev, nvec, nvec); - if (nvec == -ENOSPC) + rc = pci_enable_msi_exact(pdev, nvec); + if (rc == -ENOSPC) goto single_msi; - else if (nvec < 0) + else if (rc < 0) goto intx; /* fallback to single MSI mode if the controller enforced MRSM mode */ |