]> Git Repo - linux.git/commitdiff
misc: pci_endpoint_test: Ensure relationship between miscdev and PCI
authorRichard Weinberger <[email protected]>
Tue, 6 Jul 2021 15:43:10 +0000 (17:43 +0200)
committerGreg Kroah-Hartman <[email protected]>
Wed, 21 Jul 2021 13:54:39 +0000 (15:54 +0200)
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/misc/pci_endpoint_test.c

index 1b2868ca4f2a975decd097eb288d7e4c72df8bb1..d1137a95ad027dff203f3ee5146050c60983c752 100644 (file)
@@ -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);
This page took 0.061093 seconds and 4 git commands to generate.