[PATCH v2 020/113] commands: stat: print DT node for cdevs if available

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It may not be directly apparent, what device a cdev spawned from.
Have stat report this information for debugging purposes.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 fs/fs.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/fs.c b/fs/fs.c
index 1e357872f6ae..a7097dd3946e 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -69,6 +69,7 @@ EXPORT_SYMBOL(mkmodestr);
 
 void cdev_print(const struct cdev *cdev)
 {
+	struct device_node *np;
 	int nbytes;
 
 	if (cdev->dev || cdev->master || cdev->partname) {
@@ -118,6 +119,10 @@ void cdev_print(const struct cdev *cdev)
 
 	if (nbytes)
 		printf("\n");
+
+	np = cdev_of_node(cdev);
+	if (np)
+		printf("DT node: %pOF\n", np);
 }
 EXPORT_SYMBOL(cdev_print);
 
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux