From patchwork Mon Feb 26 13:56:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Grzeschik X-Patchwork-Id: 206640 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2089747dyb; Mon, 26 Feb 2024 05:57:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX/wkYuqvf966Jl+KDN8W9sivZIGFjZFi0SezzwYy4muKcRzp1K6aUl0yHgu5vJ5jrRkoChWktuJzvz62Jc+cgicJHCwQ== X-Google-Smtp-Source: AGHT+IF2icS4WUPmfgZ/FiWD+EUfrqzaJZoVmlT74OUdd7SmcN7QvjVlSgCEUPtaHZbDdUy899wS X-Received: by 2002:a17:906:7f89:b0:a43:5840:b8ac with SMTP id f9-20020a1709067f8900b00a435840b8acmr1458999ejr.42.1708955835760; Mon, 26 Feb 2024 05:57:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708955835; cv=pass; d=google.com; s=arc-20160816; b=RELE6tbsDPFrpXLhaRmBBuScP3scc6CCEO7/edd24almj1LzbGkYap1ZahmWZEZyrg hFwMFSuWRSK44pMLIBHrHhUOW3Ez0RDXBZDTdJ+QSxjzbJQI5gOJesliSEhKzz6ajcWM RmFXBArl/1OwWNlbUEEV9DWWVoNXFevMudVFq1+jqEu7G6ZkPdlFf6EASRV8W58xcygK TxPPueZkvVx4Sf+i39qr7q21dPjHd+R4/NRRsXeTAPgnHNQTsX3xh0xVQIDvRT2gJicy yor/Ezv+QjyD0JJZm7kEoSk/g2X+/Qto6qe7VleKmoMyJXAYYsBcNIS5eXHjLn7dxHoO 3t+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from; bh=+xObsRYDC0h8LTP3K1pKFbBlrVqvPbdeDjrFWMO5/6w=; fh=j4kDYto2y5txw4kIsFBJWe3oUIncnYU+0HsCYPolsxs=; b=QqpDiGtSzBLIh7436RfJjVwXaic4j0tRyMacVuJTRSKhtm601hhl+Viks2L3Ue+OG5 LekjKUMSWxHT1J9mVKvWDgtNAwLIOJJwYWrMZJklD5phw9R7qFcatQcQt5bm+BCGS28d lV5C+jukmNBrVKXitwwL2FWmmZtUDWYJ68+yziKDxDYrOqT2IiuriMh6M6y8zR8NkJvy gK0lEtA8LC/5NGJcS+NL7mumb+u33znOwqi4gURK/TNj29PSXiThfUTbtZ0YvBdkq6XK +w720eZKvUseeGstGlfCO72hUnhQReL1YizM+MtE9hZhiaAd5s9oPl/jsmKBZTt2rgOY wlog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-81545-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81545-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id o1-20020a1709062e8100b00a3f4f17ef12si2164687eji.872.2024.02.26.05.57.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 05:57:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81545-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-81545-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81545-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 336471F23D23 for ; Mon, 26 Feb 2024 13:57:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6907212AAD9; Mon, 26 Feb 2024 13:56:24 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55A101292D9 for ; Mon, 26 Feb 2024 13:56:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708955781; cv=none; b=K9xZbt4UbsYIlgv52IhxbYxfjSbO7KL37WffgpIq4sHy7rlDM/ztZOs20fBVSTxCF+XwBfUOu4nDsK0ZYK+bkmXWsB86lYEYRJ9XpnVEsuN/EOuE5WOxKCe86M+mviaGFeb4N9CujtXUdgoPjr0n9KTxFIyP86d2RWiLZ4qEGso= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708955781; c=relaxed/simple; bh=hLvrDMdPAFgM5IKpslImfYlwxbACfbpSQ4vSR01p87g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rm+qmNKlFQPR8KcK8+uhsASEvim4RW0zKTv+VoPBhAl+pRjii8I4CVrax4CA2rgY8CYd7y2E2RKw6Uc0dDThfcqv8emZ5HQO2d5+QR4mg7gjmHJ2oiWSPI16E2S+t0XBhLEu0tBIWE8QBo4ML6hRwYKaPMVSt8j2Bru9bQastS0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rebSh-00047C-FK; Mon, 26 Feb 2024 14:56:07 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rebSg-0030Qe-Bk; Mon, 26 Feb 2024 14:56:06 +0100 Received: from localhost ([::1] helo=dude04.red.stw.pengutronix.de) by dude04.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1rebSg-009FzF-0z; Mon, 26 Feb 2024 14:56:06 +0100 From: Michael Grzeschik Date: Mon, 26 Feb 2024 14:56:04 +0100 Subject: [PATCH v3 1/3] usb: gadget: function: move u_f.h to include/linux/usb/ Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240116-ml-topic-u9p-v3-1-c62a36eccda1@pengutronix.de> References: <20240116-ml-topic-u9p-v3-0-c62a36eccda1@pengutronix.de> In-Reply-To: <20240116-ml-topic-u9p-v3-0-c62a36eccda1@pengutronix.de> To: Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , Jonathan Corbet , Greg Kroah-Hartman Cc: v9fs@lists.linux.dev, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, kernel@pengutronix.de, Michael Grzeschik X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4766; i=m.grzeschik@pengutronix.de; h=from:subject:message-id; bh=hLvrDMdPAFgM5IKpslImfYlwxbACfbpSQ4vSR01p87g=; b=owEBbQKS/ZANAwAKAb9pWET5cfSrAcsmYgBl3Jh1ebf19STNTB0FF3JXq7kURXIvBtyy6Zh8g zQPt07t+VyJAjMEAAEKAB0WIQQV2+2Fpbqd6fvv0Gi/aVhE+XH0qwUCZdyYdQAKCRC/aVhE+XH0 q8a3D/sHscg8PGvNurbxlhXp0CVy232+AHjUoQTFrL3vSRfoHXU20KJuamZ3uU9P7EtGS/wfMuu dEx2D4WAiwhSk5wR8CEnDtzRt1EuVKRGmAtO5Uwn1R/qvv2Qnn6P16xC07/VG/NDCrsUivgEtkx UQQsYyaJxiTa+SeCbaIbmU0RI1kUxnAFKWHlrhdKtxUmcjgoLrl3wOVk7iuebLIvgJPBEbvHSWC RLnTDB1tIcZdfp2dV/NyagG8vZcPGwKwSnBivpS/nfmGmFsqNTgLeqi0acJJFWtafYET5Z7LG2I vwvXMd3CZE5wFzCw3GygwAwY+2IUZ49JObzKUdNxalsK4v0XIMSaIiFiIZfs2PiavJ3ToFYnyLJ 7SqLl5juH+fYrdwSh0qeVKE0NaBE9ns+0d9Kxnr/rLPD/h9EymbVeoGSRcf+0C0VkZxO0svG5df xSRAqWr5Cr8qNy0WMRyw34QLR+j2iUV85iQ6iS289gID944/uFbcIIp3+Gb16TzkmCXWnzsl6up 0BR7P1FH7BQfnUq9Ms/LUc6ynxWK1HaNlYlxZXV/T4dFgm7pIy2moa0Nk/lZoDHPV6xQh/WwQ4Y Iq0hwdly0Xc0coAkuNPhD9MWLvTjr+539gcWxoMHWFgGrvGusJCVTnCX4dOnaxC4wn3FIPUg4X+ 9a8dP21HdoO+OgA== X-Developer-Key: i=m.grzeschik@pengutronix.de; a=openpgp; fpr=957BC452CE953D7EA60CF4FC0BE9E3157A1E2C64 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: m.grzeschik@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791970074435008883 X-GMAIL-MSGID: 1791970074435008883 We move the u_f.h header to include/linux/usb to be able to compile function drivers outside of the drivers/usb/gadget/function directory. Signed-off-by: Michael Grzeschik --- v2 -> v3: - v1 -> v2: - new introduced patch --- drivers/usb/gadget/configfs.c | 2 +- drivers/usb/gadget/function/f_fs.c | 2 +- drivers/usb/gadget/function/f_hid.c | 2 +- drivers/usb/gadget/function/f_loopback.c | 2 +- drivers/usb/gadget/function/f_midi.c | 2 +- drivers/usb/gadget/function/f_midi2.c | 2 +- drivers/usb/gadget/function/f_sourcesink.c | 2 +- drivers/usb/gadget/u_f.c | 2 +- {drivers/usb/gadget => include/linux/usb}/u_f.h | 0 9 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index ce3cfa1f36f51..4fa3eeafba814 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -8,8 +8,8 @@ #include #include #include +#include #include "configfs.h" -#include "u_f.h" #include "u_os_desc.h" int check_user_usb_string(const char *name, diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 6bff6cb937891..c7f6e06f39b31 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -37,7 +38,6 @@ #include #include "u_fs.h" -#include "u_f.h" #include "u_os_desc.h" #include "configfs.h" diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c index 3c8a9dd585c09..a5b667a03ca83 100644 --- a/drivers/usb/gadget/function/f_hid.c +++ b/drivers/usb/gadget/function/f_hid.c @@ -16,8 +16,8 @@ #include #include #include +#include -#include "u_f.h" #include "u_hid.h" #define HIDG_MINORS 4 diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c index 17ac6ace0cffa..d500025f45128 100644 --- a/drivers/usb/gadget/function/f_loopback.c +++ b/drivers/usb/gadget/function/f_loopback.c @@ -14,9 +14,9 @@ #include #include #include +#include #include "g_zero.h" -#include "u_f.h" /* * LOOPBACK FUNCTION ... a testing vehicle for USB peripherals, diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c index 20c6fbd94f32d..2d551ba385c71 100644 --- a/drivers/usb/gadget/function/f_midi.c +++ b/drivers/usb/gadget/function/f_midi.c @@ -33,8 +33,8 @@ #include #include #include +#include -#include "u_f.h" #include "u_midi.h" MODULE_AUTHOR("Ben Williamson"); diff --git a/drivers/usb/gadget/function/f_midi2.c b/drivers/usb/gadget/function/f_midi2.c index ec8cd7c7bbfc1..ad59be1f9c54d 100644 --- a/drivers/usb/gadget/function/f_midi2.c +++ b/drivers/usb/gadget/function/f_midi2.c @@ -18,8 +18,8 @@ #include #include #include +#include -#include "u_f.h" #include "u_midi2.h" struct f_midi2; diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c index 2edbd9b510d60..4283fb2e365bd 100644 --- a/drivers/usb/gadget/function/f_sourcesink.c +++ b/drivers/usb/gadget/function/f_sourcesink.c @@ -13,10 +13,10 @@ #include #include #include +#include #include #include "g_zero.h" -#include "u_f.h" /* * SOURCE/SINK FUNCTION ... a primary testing vehicle for USB peripheral diff --git a/drivers/usb/gadget/u_f.c b/drivers/usb/gadget/u_f.c index 6aea1ecb39999..90a7f742549a4 100644 --- a/drivers/usb/gadget/u_f.c +++ b/drivers/usb/gadget/u_f.c @@ -8,7 +8,7 @@ * Author: Andrzej Pietrasiewicz */ -#include "u_f.h" +#include #include struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len) diff --git a/drivers/usb/gadget/u_f.h b/include/linux/usb/u_f.h similarity index 100% rename from drivers/usb/gadget/u_f.h rename to include/linux/usb/u_f.h