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] [day] [month] [year] [list]
Message-ID: <816efe02d72bd845a7654fa86ab2a5d78d1064de.1511218324.git.marcin.s.ciupak@gmail.com>
Date:   Tue, 21 Nov 2017 00:05:50 +0100
From:   Marcin Ciupak <marcin.s.ciupak@...il.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org
Subject: [PATCH 2/2] staging: pi433: fix naming when more than one radio is
 used

When using more than one hardware radio module pi433_probe fails as the
same name is used for all modules. Create unique name by adding minor
number to the device name.

Signed-off-by: Marcin Ciupak <marcin.s.ciupak@...il.com>
---
 drivers/staging/pi433/pi433_if.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index bc17676169cb..7a3e3101c483 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -1172,7 +1172,8 @@ static int pi433_probe(struct spi_device *spi)
 				    &spi->dev,
 				    device->devt,
 				    device,
-				    "pi433");
+				    "pi433.%d",
+				    device->minor);
 	if (IS_ERR(device->dev)) {
 		pr_err("pi433: device register failed\n");
 		retval = PTR_ERR(device->dev);
@@ -1188,7 +1189,8 @@ static int pi433_probe(struct spi_device *spi)
 	/* start tx thread */
 	device->tx_task_struct = kthread_run(pi433_tx_thread,
 					     device,
-					     "pi433_tx_task");
+					     "pi433.%d_tx_task",
+					     device->minor);
 	if (IS_ERR(device->tx_task_struct)) {
 		dev_dbg(device->dev, "start of send thread failed");
 		goto send_thread_failed;
-- 
2.15.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ