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)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user