Commit 74a03c20 authored by Richard Weinberger's avatar Richard Weinberger Committed by Greg Kroah-Hartman
Browse files

misc: pci_endpoint_test: Ensure relationship between miscdev and PCI



Set the parent pointer of the misc device to ensure a relationship
between PCI and misc dev. That way it is possible to see in
/sys/class/misc/ which pci_endpoint_test instance serves what
PCI device.

Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Link: https://lore.kernel.org/r/20210706154310.26773-1-richard@nod.at


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1d26f40
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -862,6 +862,7 @@ static int pci_endpoint_test_probe(struct pci_dev *pdev,
		err = -ENOMEM;
		goto err_release_irq;
	}
	misc_device->parent = &pdev->dev;
	misc_device->fops = &pci_endpoint_test_fops,

	err = misc_register(misc_device);