lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200731121043.24199-9-arnaud.pouliquen@st.com>
Date:   Fri, 31 Jul 2020 14:10:38 +0200
From:   Arnaud Pouliquen <arnaud.pouliquen@...com>
To:     Bjorn Andersson <bjorn.andersson@...aro.org>,
        Ohad Ben-Cohen <ohad@...ery.com>,
        Mathieu Poirier <mathieu.poirier@...aro.org>
CC:     <linux-remoteproc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <arnaud.pouliquen@...com>
Subject: [PATCH 08/13] rpmsg: raw: register service to the rpmsg control

Register the RPMSG_RAW_SERVICE service to the RPMsg control

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@...com>
---
 drivers/rpmsg/rpmsg_raw.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/drivers/rpmsg/rpmsg_raw.c b/drivers/rpmsg/rpmsg_raw.c
index 8684a78ab4d1..117da0c566ed 100644
--- a/drivers/rpmsg/rpmsg_raw.c
+++ b/drivers/rpmsg/rpmsg_raw.c
@@ -315,6 +315,11 @@ static struct rpmsg_driver rpmsg_raw_client = {
 	.remove		= rpmsg_raw_remove,
 };
 
+const struct rpmsg_drv_ctrl_info  rpmsg_raw_ctl_info = {
+	.drv_name = KBUILD_MODNAME,
+	.service = RPMSG_RAW_SERVICE,
+};
+
 static int rpmsg_raw_init(void)
 {
 	int ret;
@@ -328,7 +333,18 @@ static int rpmsg_raw_init(void)
 
 	ret = register_rpmsg_driver(&rpmsg_raw_client);
 	if (ret < 0)
-		unregister_chrdev_region(rpmsg_raw_major, RPMSG_DEV_MAX);
+		goto free_region;
+
+	ret = rpmsg_ctrl_register_ctl(&rpmsg_raw_ctl_info);
+	if (ret < 0)
+		goto free_rpmsg;
+
+	return 0;
+
+free_rpmsg:
+	unregister_rpmsg_driver(&rpmsg_raw_client);
+free_region:
+	unregister_chrdev_region(rpmsg_raw_major, RPMSG_DEV_MAX);
 
 	return ret;
 }
@@ -336,6 +352,7 @@ module_init(rpmsg_raw_init);
 
 static void rpmsg_raw_exit(void)
 {
+	rpmsg_ctrl_unregister_ctl(&rpmsg_raw_ctl_info);
 	unregister_rpmsg_driver(&rpmsg_raw_client);
 	unregister_chrdev_region(rpmsg_raw_major, RPMSG_DEV_MAX);
 }
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ