Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364603
b: refs/heads/master
c: dbfff05
h: refs/heads/master
i:
  364601: 9030b4b
  364599: 456b83e
v: v3
  • Loading branch information
Felipe Balbi committed Mar 18, 2013
1 parent 8d7d8a9 commit f8a8485
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ec0ddb1b4fe3f7d93fdc862d2a7338cd354fe94
refs/heads/master: dbfff05d7c9b982e364c90a699961fb7000c6181
41 changes: 22 additions & 19 deletions trunk/drivers/usb/dwc3/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -667,28 +667,31 @@ int dwc3_debugfs_init(struct dwc3 *dwc)
goto err1;
}

#if IS_ENABLED(CONFIG_USB_DWC3_GADGET)
file = debugfs_create_file("mode", S_IRUGO | S_IWUSR, root,
dwc, &dwc3_mode_fops);
if (!file) {
ret = -ENOMEM;
goto err1;
if (IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE)) {
file = debugfs_create_file("mode", S_IRUGO | S_IWUSR, root,
dwc, &dwc3_mode_fops);
if (!file) {
ret = -ENOMEM;
goto err1;
}
}

file = debugfs_create_file("testmode", S_IRUGO | S_IWUSR, root,
dwc, &dwc3_testmode_fops);
if (!file) {
ret = -ENOMEM;
goto err1;
}

file = debugfs_create_file("link_state", S_IRUGO | S_IWUSR, root,
dwc, &dwc3_link_state_fops);
if (!file) {
ret = -ENOMEM;
goto err1;
if (IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE) ||
IS_ENABLED(CONFIG_USB_DWC3_GADGET)) {
file = debugfs_create_file("testmode", S_IRUGO | S_IWUSR, root,
dwc, &dwc3_testmode_fops);
if (!file) {
ret = -ENOMEM;
goto err1;
}

file = debugfs_create_file("link_state", S_IRUGO | S_IWUSR, root,
dwc, &dwc3_link_state_fops);
if (!file) {
ret = -ENOMEM;
goto err1;
}
}
#endif

return 0;

Expand Down

0 comments on commit f8a8485

Please sign in to comment.