From patchwork Thu Nov 14 10:41:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?Q2h1bmZlbmcgWXVuICjkupHmmKXls7Ap?= X-Patchwork-Id: 11243425 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BF7E314ED for ; Thu, 14 Nov 2019 10:42:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F95D20729 for ; Thu, 14 Nov 2019 10:42:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="Q0pHoOes" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727073AbfKNKmF (ORCPT ); Thu, 14 Nov 2019 05:42:05 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:46935 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727036AbfKNKmE (ORCPT ); Thu, 14 Nov 2019 05:42:04 -0500 X-UUID: 7f686574ca9c44eba133bcab1ab09023-20191114 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=Bf0H4NjN87Eyxjtkpl/ipYmRPL+ArIku0qP3VxKPEJk=; b=Q0pHoOest2FldG5WppE9xyXLued4wKvJ8edwCasNM9OGJrmGpsCvH7txcC+sbL4z12Bk/9X3BlX6NX2rkmSd4w7q27V8NH74E5jgKhZKOwT7gqowUW6GWtCk8zuJaF3h9i2MOvsS9nUgS9i5NdNQchhkW2ESCa0sel8MgpfDfmI=; X-UUID: 7f686574ca9c44eba133bcab1ab09023-20191114 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Cellopoint E-mail Firewall v4.1.10 Build 0809 with TLS) with ESMTP id 1022739100; Thu, 14 Nov 2019 18:41:58 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n2.mediatek.inc (172.21.101.141) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 14 Nov 2019 18:41:55 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 14 Nov 2019 18:41:52 +0800 From: Chunfeng Yun To: Greg Kroah-Hartman , Felipe Balbi CC: Laurent Pinchart , Mauro Carvalho Chehab , Peter Chen , Minas Harutyunyan , Cristian Birsan , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Kevin Cernekee , Florian Fainelli , , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Bin Liu , Matthias Brugger , Stephen Boyd , Chunfeng Yun , Yoshihiro Shimoda , Colin Ian King , Biju Das , Fabrizio Castro , "Gustavo A. R. Silva" , Yangtao Li , , , , , Subject: [PATCH v3 12/13] usb: gadget: udc: gr_udc: create debugfs directory under usb root Date: Thu, 14 Nov 2019 18:41:24 +0800 Message-ID: <1573728085-29016-12-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1573728085-29016-1-git-send-email-chunfeng.yun@mediatek.com> References: <1573728085-29016-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-MTK: N Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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 --- v3: 1. fix up build error of undefined usb_debug_root v2: 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 --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 #include #include +#include #include #include #include @@ -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); }