From patchwork Mon May 9 11:54:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linyu Yuan X-Patchwork-Id: 571194 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91997C433EF for ; Mon, 9 May 2022 11:55:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233480AbiEIL7D (ORCPT ); Mon, 9 May 2022 07:59:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233461AbiEIL64 (ORCPT ); Mon, 9 May 2022 07:58:56 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F375200F63 for ; Mon, 9 May 2022 04:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652097302; x=1683633302; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=smt1U/y7Brry6KFq+8B3Hme0EQjSZ/RLOSLFLwYUfgY=; b=cSSbCYPBGyVb8WvwznqxFGSjp0GuZSxKcdMfwRJIr4VlN+85Kvo0V0mM ANCV+qSHPStsM3Npo0C8t6oawubYs/M6odvI2/iDjLg0qwta8Ra89VQeZ uuvGt6Wm5GH/sysLfJ4imOG3DFAVWXWiTJUIpVxo5BWQo88SQrpdzJJP+ w=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 09 May 2022 04:55:02 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 04:55:02 -0700 Received: from nalasex01b.na.qualcomm.com (10.47.209.197) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 04:55:01 -0700 Received: from linyyuan-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 04:55:00 -0700 From: Linyu Yuan To: Greg Kroah-Hartman CC: , Jack Pham , "Linyu Yuan" Subject: [PATCH v3 1/4] usb: gadget: f_mass_storage: fix warning of -Werror=unused-but-set-variable Date: Mon, 9 May 2022 19:54:45 +0800 Message-ID: <1652097288-19909-2-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1652097288-19909-1-git-send-email-quic_linyyuan@quicinc.com> References: <1652097288-19909-1-git-send-email-quic_linyyuan@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org When add gcc W=1 compile flag, it report following error, In function 'invalidate_sub': error: variable 'rc' set but not used [-Werror=unused-but-set-variable], Add a __maybe_unused property. Signed-off-by: Linyu Yuan --- v3: new add drivers/usb/gadget/function/f_mass_storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c index 3a77bca..a688538 100644 --- a/drivers/usb/gadget/function/f_mass_storage.c +++ b/drivers/usb/gadget/function/f_mass_storage.c @@ -926,7 +926,7 @@ static void invalidate_sub(struct fsg_lun *curlun) { struct file *filp = curlun->filp; struct inode *inode = file_inode(filp); - unsigned long rc; + unsigned long __maybe_unused rc; rc = invalidate_mapping_pages(inode->i_mapping, 0, -1); VLDBG(curlun, "invalidate_mapping_pages -> %ld\n", rc); From patchwork Mon May 9 11:54:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linyu Yuan X-Patchwork-Id: 571775 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B7CAC433F5 for ; Mon, 9 May 2022 11:55:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233461AbiEIL7D (ORCPT ); Mon, 9 May 2022 07:59:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233469AbiEIL67 (ORCPT ); Mon, 9 May 2022 07:58:59 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6343D205275 for ; Mon, 9 May 2022 04:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652097304; x=1683633304; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ewKZ9R7MKLDgAsvHvAp1Pbm3tIjjaybJf6Fz8EqsUTE=; b=E+bfyx/ZO9H/3FqSgaj/xmUV5ZnOiTXdODHvxPwBVboUipry+WNprDoR 6hpr2f14rOGg/JRql+vDS5/UXm6id+QHfBOE30glYEOs7n8//MSndIldj IZ/OhKnJHjNfxdzR4ZJC+zaHoHvWrHC4dtkQECGS4AUKmUWPTBb1TrNEH U=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-02.qualcomm.com with ESMTP; 09 May 2022 04:55:03 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 04:55:03 -0700 Received: from nalasex01b.na.qualcomm.com (10.47.209.197) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 04:55:03 -0700 Received: from linyyuan-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 04:55:01 -0700 From: Linyu Yuan To: Greg Kroah-Hartman CC: , Jack Pham , "Linyu Yuan" Subject: [PATCH v3 2/4] usb: gadget: f_sourcesink: use DECLARE_USB_FUNCTION_INIT() Date: Mon, 9 May 2022 19:54:46 +0800 Message-ID: <1652097288-19909-3-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1652097288-19909-1-git-send-email-quic_linyyuan@quicinc.com> References: <1652097288-19909-1-git-send-email-quic_linyyuan@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org First there is no reason call lb_modinit() and lb_modexit() which belong to f_loopback.c, let's remove them here and remove two function prototype from g_zero.h. After first step, we can use DECLARE_USB_FUNCTION_INIT() macro to create module init/exit function implicit as it only register/unregister one usb function driver. Signed-off-by: Linyu Yuan --- v3: new add drivers/usb/gadget/function/f_sourcesink.c | 22 +--------------------- drivers/usb/gadget/function/g_zero.h | 3 --- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c index 6803cd6..f4a0793 100644 --- a/drivers/usb/gadget/function/f_sourcesink.c +++ b/drivers/usb/gadget/function/f_sourcesink.c @@ -1263,27 +1263,7 @@ static struct usb_function_instance *source_sink_alloc_inst(void) return &ss_opts->func_inst; } -DECLARE_USB_FUNCTION(SourceSink, source_sink_alloc_inst, +DECLARE_USB_FUNCTION_INIT(SourceSink, source_sink_alloc_inst, source_sink_alloc_func); -static int __init sslb_modinit(void) -{ - int ret; - - ret = usb_function_register(&SourceSinkusb_func); - if (ret) - return ret; - ret = lb_modinit(); - if (ret) - usb_function_unregister(&SourceSinkusb_func); - return ret; -} -static void __exit sslb_modexit(void) -{ - usb_function_unregister(&SourceSinkusb_func); - lb_modexit(); -} -module_init(sslb_modinit); -module_exit(sslb_modexit); - MODULE_LICENSE("GPL"); diff --git a/drivers/usb/gadget/function/g_zero.h b/drivers/usb/gadget/function/g_zero.h index 98b8462..c1ea285 100644 --- a/drivers/usb/gadget/function/g_zero.h +++ b/drivers/usb/gadget/function/g_zero.h @@ -62,9 +62,6 @@ struct f_lb_opts { int refcnt; }; -void lb_modexit(void); -int lb_modinit(void); - /* common utilities */ void disable_endpoints(struct usb_composite_dev *cdev, struct usb_ep *in, struct usb_ep *out, From patchwork Mon May 9 11:54:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linyu Yuan X-Patchwork-Id: 571193 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 33E59C433EF for ; Mon, 9 May 2022 11:55:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233484AbiEIL7E (ORCPT ); Mon, 9 May 2022 07:59:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233472AbiEIL67 (ORCPT ); Mon, 9 May 2022 07:58:59 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88D70205276 for ; Mon, 9 May 2022 04:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652097305; x=1683633305; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h2M7C/AGk65xLxLhvlePjPuwCBpbhAIwijTEo9i36N0=; b=jO8LTnNJIApsvzTBJ1vb8bQO2N05XjOBvEL2AXkifpEuD99k67QCh/I/ olFNskYgkjlCXLCta17imelPm7QnnUn7K4L03ZpqRGunREMCfzk7QtTJ/ jr0X1/QjTTWA2JYgi9gICzfWHdPO1vfKoFFYPk16x1z7+CNVxjGe3ScpI M=; Received: from unknown (HELO ironmsg03-sd.qualcomm.com) ([10.53.140.143]) by alexa-out-sd-01.qualcomm.com with ESMTP; 09 May 2022 04:55:05 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg03-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 04:55:05 -0700 Received: from nalasex01b.na.qualcomm.com (10.47.209.197) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 04:55:05 -0700 Received: from linyyuan-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 04:55:03 -0700 From: Linyu Yuan To: Greg Kroah-Hartman CC: , Jack Pham , "Linyu Yuan" Subject: [PATCH v3 3/4] usb: gadget: f_loopback: use DECLARE_USB_FUNCTION_INIT() macro Date: Mon, 9 May 2022 19:54:47 +0800 Message-ID: <1652097288-19909-4-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1652097288-19909-1-git-send-email-quic_linyyuan@quicinc.com> References: <1652097288-19909-1-git-send-email-quic_linyyuan@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org As lb_modexit()/lb_modinit() just register/unregister the loopback usb function driver, DECLARE_USB_FUNCTION_INIT() macro do same thing, let's use this macro instead and remove lb_modexit()//lb_modinit(). Signed-off-by: Linyu Yuan Reported-by: kernel test robot --- v3: new add according review comment drivers/usb/gadget/function/f_loopback.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c index ae41f55..b0eda4f 100644 --- a/drivers/usb/gadget/function/f_loopback.c +++ b/drivers/usb/gadget/function/f_loopback.c @@ -583,16 +583,6 @@ static struct usb_function_instance *loopback_alloc_instance(void) return &lb_opts->func_inst; } -DECLARE_USB_FUNCTION(Loopback, loopback_alloc_instance, loopback_alloc); - -int __init lb_modinit(void) -{ - return usb_function_register(&Loopbackusb_func); -} - -void __exit lb_modexit(void) -{ - usb_function_unregister(&Loopbackusb_func); -} +DECLARE_USB_FUNCTION_INIT(Loopback, loopback_alloc_instance, loopback_alloc); MODULE_LICENSE("GPL"); From patchwork Mon May 9 11:54:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linyu Yuan X-Patchwork-Id: 571774 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BB776C4332F for ; Mon, 9 May 2022 11:55:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233472AbiEIL7F (ORCPT ); Mon, 9 May 2022 07:59:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233475AbiEIL7A (ORCPT ); Mon, 9 May 2022 07:59:00 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D36212719A for ; Mon, 9 May 2022 04:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652097307; x=1683633307; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UdzJN7QVSt9EeRIIN1Oq0vjQ4HOpUGctRXR05rWYM1g=; b=XMFA4PK7zfrXmLdAeceK4klybNmlPMupTSe9FCk3F9osR7UZSez3aodv 69EC7K6D8iVVwYbQul6FgdL0Dl6GJiLhaXhHAS24k66HEyVoyy/Ps5bZE +mAWoSX6xdj/WGDOKHK2XXGHxF2YPOr5n/QfteRryESHe5gwJVc2e2WZD I=; Received: from ironmsg07-lv.qualcomm.com ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 09 May 2022 04:55:07 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg07-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2022 04:55:06 -0700 Received: from nalasex01b.na.qualcomm.com (10.47.209.197) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 04:55:06 -0700 Received: from linyyuan-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Mon, 9 May 2022 04:55:05 -0700 From: Linyu Yuan To: Greg Kroah-Hartman CC: , Jack Pham , "Linyu Yuan" Subject: [PATCH v3 4/4] usb: gadget: add '_' in DECLARE_USB_FUNCTION(_INIT) macros Date: Mon, 9 May 2022 19:54:48 +0800 Message-ID: <1652097288-19909-5-git-send-email-quic_linyyuan@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1652097288-19909-1-git-send-email-quic_linyyuan@quicinc.com> References: <1652097288-19909-1-git-send-email-quic_linyyuan@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org DECLARE_USB_FUNCTION_INIT(ffs, ffs_alloc_inst, ffs_alloc) will generate function ffsmod_init/ffsmod_exit() and variable ffsusb_func. Add possible character '_' in the macros which will generate function/variable name in common format, ffs_mod_init/ffs_mod_exit() and ffs_usb_func. f_tcm.c doing more thing in module init/exit, it will not use DECLARE_USB_FUNCTION_INIT() macro, but we change DECLARE_USB_FUNCTION() macro, it will change static struct usb_function_driver variable from tcmusb_func to tcm_usb_func, so update tcm_init()/tcm_exit() to use tcm_usb_func. Signed-off-by: Linyu Yuan --- v2: fix build issue from kernel test robot v3: change commit description and add f_tcm.c change drivers/usb/gadget/function/f_tcm.c | 6 +++--- include/linux/usb/composite.h | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c index 8e17ac8..4873587 100644 --- a/drivers/usb/gadget/function/f_tcm.c +++ b/drivers/usb/gadget/function/f_tcm.c @@ -2310,13 +2310,13 @@ static int tcm_init(void) { int ret; - ret = usb_function_register(&tcmusb_func); + ret = usb_function_register(&tcm_usb_func); if (ret) return ret; ret = target_register_template(&usbg_ops); if (ret) - usb_function_unregister(&tcmusb_func); + usb_function_unregister(&tcm_usb_func); return ret; } @@ -2325,7 +2325,7 @@ module_init(tcm_init); static void tcm_exit(void) { target_unregister_template(&usbg_ops); - usb_function_unregister(&tcmusb_func); + usb_function_unregister(&tcm_usb_func); } module_exit(tcm_exit); diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index 9d27622..0eac583 100644 --- a/include/linux/usb/composite.h +++ b/include/linux/usb/composite.h @@ -611,7 +611,7 @@ int usb_add_config_only(struct usb_composite_dev *cdev, void usb_remove_function(struct usb_configuration *c, struct usb_function *f); #define DECLARE_USB_FUNCTION(_name, _inst_alloc, _func_alloc) \ - static struct usb_function_driver _name ## usb_func = { \ + static struct usb_function_driver _name ## _usb_func = { \ .name = __stringify(_name), \ .mod = THIS_MODULE, \ .alloc_inst = _inst_alloc, \ @@ -621,16 +621,16 @@ void usb_remove_function(struct usb_configuration *c, struct usb_function *f); #define DECLARE_USB_FUNCTION_INIT(_name, _inst_alloc, _func_alloc) \ DECLARE_USB_FUNCTION(_name, _inst_alloc, _func_alloc) \ - static int __init _name ## mod_init(void) \ + static int __init _name ## _mod_init(void) \ { \ - return usb_function_register(&_name ## usb_func); \ + return usb_function_register(&_name ## _usb_func); \ } \ - static void __exit _name ## mod_exit(void) \ + static void __exit _name ## _mod_exit(void) \ { \ - usb_function_unregister(&_name ## usb_func); \ + usb_function_unregister(&_name ## _usb_func); \ } \ - module_init(_name ## mod_init); \ - module_exit(_name ## mod_exit) + module_init(_name ## _mod_init); \ + module_exit(_name ## _mod_exit) /* messaging utils */ #define DBG(d, fmt, args...) \