History

PCI: Add pci_dev_id() helper

In several places in the kernel we find PCI_DEVID used like this: PCI_DEVID(dev->bus->number, dev->devfn) Add a "pci_dev_id(struct pci_dev *dev)" helper to simplify callers.

Heiner Kallweit committed 7 years ago

Commit 4e544ba1 parent e0547c83 files · +11 −10Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/pci.h+5−0
@@ -596,6 +596,11 @@ struct pci_bus { · 595 unmodified lines
596 596
597#define to_pci_bus(n) container_of(n, struct pci_bus, dev)597#define to_pci_bus(n) container_of(n, struct pci_bus, dev)
598 598
599static inline u16 pci_dev_id(struct pci_dev *dev)
600{
601 return PCI_DEVID(dev->bus->number, dev->devfn);
602}
603
599/*604/*
600 * Returns true if the PCI bus is root (behind host-PCI bridge),605 * Returns true if the PCI bus is root (behind host-PCI bridge),
601 * false otherwise606 * false otherwise

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t