Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3d2f165 authored by Geliang Tang's avatar Geliang Tang Committed by Bjorn Helgaas
Browse files

PCI: Use to_pci_dev() instead of open-coding it



Use to_pci_dev() instead of open-coding it.

Signed-off-by: default avatarGeliang Tang <geliangtang@163.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent ff3ce480
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ static ssize_t show_ctrl(struct device *dev, struct device_attribute *attr, char
	struct resource *res;
	struct pci_bus *bus;

	pdev = container_of(dev, struct pci_dev, dev);
	pdev = to_pci_dev(dev);
	bus = pdev->subordinate;

	out += sprintf(buf, "Free resources: memory\n");
+1 −1
Original line number Diff line number Diff line
@@ -1417,7 +1417,7 @@ struct pci_devres {

static void pcim_release(struct device *gendev, void *res)
{
	struct pci_dev *dev = container_of(gendev, struct pci_dev, dev);
	struct pci_dev *dev = to_pci_dev(gendev);
	struct pci_devres *this = res;
	int i;