Skip to content

Commit

Permalink
usb: mtu3: fix up undefined reference to usb_debug_root
Browse files Browse the repository at this point in the history
When CONFIG_USB is not set, and CONFIG_USB_GADGET is set,
there is an issue:

ld:
drivers/usb/mtu3/mtu3_debugfs.o: in function 'ssusb_debugfs_create_root':
mtu3_debugfs.c:(.text+0xba3): undefined reference to 'usb_debug_root'

usb_debug_root is only built when CONFIG_USB is enabled, so here drop it
and use NULL instead.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Chunfeng Yun authored and Greg Kroah-Hartman committed May 21, 2019
1 parent a03ff54 commit 9610450
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/mtu3/mtu3_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,7 @@ void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb)

void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb)
{
ssusb->dbgfs_root =
debugfs_create_dir(dev_name(ssusb->dev), usb_debug_root);
ssusb->dbgfs_root = debugfs_create_dir(dev_name(ssusb->dev), NULL);
}

void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb)
Expand Down

0 comments on commit 9610450

Please sign in to comment.