diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2021-11-05 11:28:43 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-11-05 11:28:43 -0500 |
commit | d03c426f7a739d017623d49ade2d3ce4dc766e2a (patch) | |
tree | 27d0ac7c33c4339e7ca8d2359f75576c496b32c4 /include/linux/pci.h | |
parent | 1cac57a267c1692594413f27913adec85ba3b02a (diff) | |
parent | b5f9c644eb1baafcd349ad134e2110773f8d0a38 (diff) | |
download | linux-d03c426f7a739d017623d49ade2d3ce4dc766e2a.tar.gz linux-d03c426f7a739d017623d49ade2d3ce4dc766e2a.tar.bz2 linux-d03c426f7a739d017623d49ade2d3ce4dc766e2a.zip |
Merge branch 'pci/driver'
- Drop the struct pci_dev.driver pointer, which is redundant with the
struct device.driver pointer (Uwe Kleine-König)
* pci/driver:
PCI: Remove struct pci_dev->driver
PCI: Use to_pci_driver() instead of pci_dev->driver
x86/pci/probe_roms: Use to_pci_driver() instead of pci_dev->driver
perf/x86/intel/uncore: Use to_pci_driver() instead of pci_dev->driver
powerpc/eeh: Use to_pci_driver() instead of pci_dev->driver
usb: xhci: Use to_pci_driver() instead of pci_dev->driver
cxl: Use to_pci_driver() instead of pci_dev->driver
cxl: Factor out common dev->driver expressions
xen/pcifront: Use to_pci_driver() instead of pci_dev->driver
xen/pcifront: Drop pcifront_common_process() tests of pcidev, pdrv
nfp: use dev_driver_string() instead of pci_dev->driver->name
mlxsw: pci: Use dev_driver_string() instead of pci_dev->driver->name
net: marvell: prestera: use dev_driver_string() instead of pci_dev->driver->name
net: hns3: use dev_driver_string() instead of pci_dev->driver->name
crypto: hisilicon - use dev_driver_string() instead of pci_dev->driver->name
powerpc/eeh: Use dev_driver_string() instead of struct pci_dev->driver->name
ssb: Use dev_driver_string() instead of pci_dev->driver->name
bcma: simplify reference to driver name
crypto: qat - simplify adf_enable_aer()
scsi: message: fusion: Remove unused mpt_pci driver .probe() 'id' parameter
PCI/ERR: Factor out common dev->driver expressions
PCI: Drop pci_device_probe() test of !pci_dev->driver
PCI: Drop pci_device_remove() test of pci_dev->driver
PCI: Return NULL for to_pci_driver(NULL)
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 7e0ce3a4d5a1..91b32811ee20 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -342,7 +342,6 @@ struct pci_dev { u16 pcie_flags_reg; /* Cached PCIe Capabilities Register */ unsigned long *dma_alias_mask;/* Mask of enabled devfn aliases */ - struct pci_driver *driver; /* Driver bound to this device */ u64 dma_mask; /* Mask of the bits of bus address this device implements. Normally this is 0xffffffff. You only need to change @@ -900,7 +899,10 @@ struct pci_driver { struct pci_dynids dynids; }; -#define to_pci_driver(drv) container_of(drv, struct pci_driver, driver) +static inline struct pci_driver *to_pci_driver(struct device_driver *drv) +{ + return drv ? container_of(drv, struct pci_driver, driver) : NULL; +} /** * PCI_DEVICE - macro used to describe a specific PCI device |