Skip to content

Commit 49d665b

Browse files
bjorn-helgaaskuba-moo
authored andcommitted
qed: Drop useless pci_params.pm_cap
qed_init_pci() used pci_params.pm_cap only to cache the pci_dev.pm_cap. Drop the cache and use pci_dev.pm_cap directly. Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 3bcbc67 commit 49d665b

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

drivers/net/ethernet/qlogic/qed/qed.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,6 @@ struct qed_hwfn {
662662
};
663663

664664
struct pci_params {
665-
int pm_cap;
666-
667665
unsigned long mem_start;
668666
unsigned long mem_end;
669667
unsigned int irq;

drivers/net/ethernet/qlogic/qed/qed_main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,7 @@ static int qed_init_pci(struct qed_dev *cdev, struct pci_dev *pdev)
323323
goto err2;
324324
}
325325

326-
cdev->pci_params.pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
327-
if (IS_PF(cdev) && !cdev->pci_params.pm_cap)
326+
if (IS_PF(cdev) && !pdev->pm_cap)
328327
DP_NOTICE(cdev, "Cannot find power management capability\n");
329328

330329
rc = dma_set_mask_and_coherent(&cdev->pdev->dev, DMA_BIT_MASK(64));

0 commit comments

Comments
 (0)