Commit 99ee4774 authored by Marcin Ciupak's avatar Marcin Ciupak Committed by Greg Kroah-Hartman

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: default avatarMarcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d2cb4845
......@@ -1111,7 +1111,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);
......@@ -1127,7 +1128,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment