From patchwork Wed Nov 20 06:43:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chunfeng Yun X-Patchwork-Id: 11253239 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 0EBA41390 for ; Wed, 20 Nov 2019 06:43:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E2BDB206D8 for ; Wed, 20 Nov 2019 06:43:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="CW/Z+rLH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726001AbfKTGnf (ORCPT ); Wed, 20 Nov 2019 01:43:35 -0500 Received: from Mailgw01.mediatek.com ([1.203.163.78]:39429 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725854AbfKTGne (ORCPT ); Wed, 20 Nov 2019 01:43:34 -0500 X-UUID: 1382161130ac402e84bec778131b952a-20191120 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=CW/Z+rLH7yh0KtlkqNa8gXmqCBJm2VfPuoEHk7LWs2Q49rtSS1Tyyny6qiU0Bz1ofy9O2xhnw2NgccaT8pbrga68Ni/FFWh4Q02wH2ba0ULMbAp4uyMaXA4tqsFcWQ41+U4cVI+6VFy53hOrAXVGEFkqJ0Kk2tLW6DOtT7Yv7fU=; X-UUID: 1382161130ac402e84bec778131b952a-20191120 Received: from mtkcas32.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 264360212; Wed, 20 Nov 2019 14:43:22 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 20 Nov 2019 14:42:31 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 20 Nov 2019 14:43:00 +0800 From: Chunfeng Yun To: Felipe Balbi , Greg Kroah-Hartman CC: Cristian Birsan , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , Bin Liu , Matthias Brugger , Stephen Boyd , Chunfeng Yun , , , , Subject: [RESEND PATCH v3 3/3] usb: gadget: udc: gr_udc: create debugfs directory under usb root Date: Wed, 20 Nov 2019 14:43:03 +0800 Message-ID: <1574232183-5760-3-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1574232183-5760-1-git-send-email-chunfeng.yun@mediatek.com> References: <1574232183-5760-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 X-TM-SNTS-SMTP: 13A396944ECAEF168D722F1FF46B51809385C180D0D671363AF7CA160F0B07A82000:8 X-MTK: N Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@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); }