* [PATCH] misc: pci_endpoint_test: Ensure relationship between miscdev and PCI
@ 2021-07-06 15:43 Richard Weinberger
0 siblings, 0 replies; only message in thread
From: Richard Weinberger @ 2021-07-06 15:43 UTC (permalink / raw)
To: kishon
Cc: lorenzo.pieralisi, kw, arnd, gregkh, linux-pci, linux-kernel,
Richard Weinberger
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: Richard Weinberger <richard@nod.at>
---
drivers/misc/pci_endpoint_test.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/misc/pci_endpoint_test.c b/drivers/misc/pci_endpoint_test.c
index 1b2868ca4f2a..d1137a95ad02 100644
--- a/drivers/misc/pci_endpoint_test.c
+++ b/drivers/misc/pci_endpoint_test.c
@@ -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);
--
2.26.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-06 15:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 15:43 [PATCH] misc: pci_endpoint_test: Ensure relationship between miscdev and PCI Richard Weinberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).