]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: Use to_pci_driver() instead of pci_dev->driver
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 12 Oct 2021 21:11:24 +0000 (16:11 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 18 Oct 2021 14:20:15 +0000 (09:20 -0500)
commiteed08cea8988a38f1dba20a9bc6817b57aceca6a
tree199c2d2274b02bbb5e702ba124565c868fd1e069
parentc5a1f31ee4a91f12788962c3a3c80d7f7ebb3198
PCI: 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 pci_dev->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>
drivers/pci/iov.c
drivers/pci/pci-driver.c
drivers/pci/pci.c
drivers/pci/pcie/err.c