diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-10-13 00:03:39 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2021-10-18 17:20:15 +0300 |
commit | 16bd44e54dfba2a403833d11acea63e186de23c6 (patch) | |
tree | 9c0e2958449b0b8e2773af086e9c7435d409a823 /drivers/misc/cxl/guest.c | |
parent | 4e59b75430f0bf515ac0a6b2d61861aefc601776 (diff) | |
download | linux-16bd44e54dfba2a403833d11acea63e186de23c6.tar.xz |
cxl: Use to_pci_driver() instead of pci_dev->driver
Struct pci_driver contains a struct device_driver, so for PCI devices, it's
easy to convert a device_driver * to a pci_driver * with to_pci_driver().
The device_driver * is in struct device, so we don't need to also keep
track of the pci_driver * in struct pci_dev.
Replace pdev->driver with to_pci_driver(). This is a step toward removing
pci_dev->driver.
[bhelgaas: split to separate patch]
Link: https://lore.kernel.org/r/20211004125935.2300113-11-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/misc/cxl/guest.c')
-rw-r--r-- | drivers/misc/cxl/guest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/cxl/guest.c b/drivers/misc/cxl/guest.c index 94e29bab6b44..9d485c9e3fff 100644 --- a/drivers/misc/cxl/guest.c +++ b/drivers/misc/cxl/guest.c @@ -27,7 +27,7 @@ static void pci_error_handlers(struct cxl_afu *afu, return; list_for_each_entry(afu_dev, &afu->phb->bus->devices, bus_list) { - afu_drv = afu_dev->driver; + afu_drv = to_pci_driver(afu_dev->dev.driver); if (!afu_drv) continue; |