[v3,12/13] usb: gadget: udc: gr_udc: create debugfs directory under usb root
diff mbox series

Message ID 1573728085-29016-12-git-send-email-chunfeng.yun@mediatek.com
State New
Headers show
  • [v3,01/13] media: uvcvideo: drop error check of debugfs_create_dir()
Related show

Commit Message

Chunfeng Yun Nov. 14, 2019, 10:41 a.m. UTC
Now the USB gadget subsystem can use the USB debugfs root directory,
so move it's directory from the root of the debugfs filesystem into
the root of usb

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
  1. fix up build error of undefined usb_debug_root

  1. abandon new API usb_debugfs_create_dir(), and use usb_debug_root
 drivers/usb/gadget/udc/gr_udc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff mbox series

diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c
index 7a0e9a58c2d8..5d5a0bc79757 100644
--- a/drivers/usb/gadget/udc/gr_udc.c
+++ b/drivers/usb/gadget/udc/gr_udc.c
@@ -29,6 +29,7 @@ 
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/device.h>
+#include <linux/usb.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/dma-mapping.h>
@@ -208,7 +209,7 @@  static void gr_dfs_create(struct gr_udc *dev)
 	const char *name = "gr_udc_state";
-	dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), NULL);
+	dev->dfs_root = debugfs_create_dir(dev_name(dev->dev), usb_debug_root);
 	debugfs_create_file(name, 0444, dev->dfs_root, dev, &gr_dfs_fops);