aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmatest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/dmatest.c')
-rw-r--r--drivers/dma/dmatest.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index d1e381e35a9e..ed9636bfb54a 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -20,11 +20,11 @@ static unsigned int test_buf_size = 16384;
20module_param(test_buf_size, uint, S_IRUGO); 20module_param(test_buf_size, uint, S_IRUGO);
21MODULE_PARM_DESC(test_buf_size, "Size of the memcpy test buffer"); 21MODULE_PARM_DESC(test_buf_size, "Size of the memcpy test buffer");
22 22
23static char test_channel[BUS_ID_SIZE]; 23static char test_channel[20];
24module_param_string(channel, test_channel, sizeof(test_channel), S_IRUGO); 24module_param_string(channel, test_channel, sizeof(test_channel), S_IRUGO);
25MODULE_PARM_DESC(channel, "Bus ID of the channel to test (default: any)"); 25MODULE_PARM_DESC(channel, "Bus ID of the channel to test (default: any)");
26 26
27static char test_device[BUS_ID_SIZE]; 27static char test_device[20];
28module_param_string(device, test_device, sizeof(test_device), S_IRUGO); 28module_param_string(device, test_device, sizeof(test_device), S_IRUGO);
29MODULE_PARM_DESC(device, "Bus ID of the DMA Engine to test (default: any)"); 29MODULE_PARM_DESC(device, "Bus ID of the DMA Engine to test (default: any)");
30 30
@@ -80,14 +80,14 @@ static bool dmatest_match_channel(struct dma_chan *chan)
80{ 80{
81 if (test_channel[0] == '\0') 81 if (test_channel[0] == '\0')
82 return true; 82 return true;
83 return strcmp(chan->dev.bus_id, test_channel) == 0; 83 return strcmp(dev_name(&chan->dev), test_channel) == 0;
84} 84}
85 85
86static bool dmatest_match_device(struct dma_device *device) 86static bool dmatest_match_device(struct dma_device *device)
87{ 87{
88 if (test_device[0] == '\0') 88 if (test_device[0] == '\0')
89 return true; 89 return true;
90 return strcmp(device->dev->bus_id, test_device) == 0; 90 return strcmp(dev_name(device->dev), test_device) == 0;
91} 91}
92 92
93static unsigned long dmatest_random(void) 93static unsigned long dmatest_random(void)
@@ -332,7 +332,7 @@ static enum dma_state_client dmatest_add_channel(struct dma_chan *chan)
332 332
333 dtc = kmalloc(sizeof(struct dmatest_chan), GFP_KERNEL); 333 dtc = kmalloc(sizeof(struct dmatest_chan), GFP_KERNEL);
334 if (!dtc) { 334 if (!dtc) {
335 pr_warning("dmatest: No memory for %s\n", chan->dev.bus_id); 335 pr_warning("dmatest: No memory for %s\n", dev_name(&chan->dev));
336 return DMA_NAK; 336 return DMA_NAK;
337 } 337 }
338 338
@@ -343,16 +343,16 @@ static enum dma_state_client dmatest_add_channel(struct dma_chan *chan)
343 thread = kzalloc(sizeof(struct dmatest_thread), GFP_KERNEL); 343 thread = kzalloc(sizeof(struct dmatest_thread), GFP_KERNEL);
344 if (!thread) { 344 if (!thread) {
345 pr_warning("dmatest: No memory for %s-test%u\n", 345 pr_warning("dmatest: No memory for %s-test%u\n",
346 chan->dev.bus_id, i); 346 dev_name(&chan->dev), i);
347 break; 347 break;
348 } 348 }
349 thread->chan = dtc->chan; 349 thread->chan = dtc->chan;
350 smp_wmb(); 350 smp_wmb();
351 thread->task = kthread_run(dmatest_func, thread, "%s-test%u", 351 thread->task = kthread_run(dmatest_func, thread, "%s-test%u",
352 chan->dev.bus_id, i); 352 dev_name(&chan->dev), i);
353 if (IS_ERR(thread->task)) { 353 if (IS_ERR(thread->task)) {
354 pr_warning("dmatest: Failed to run thread %s-test%u\n", 354 pr_warning("dmatest: Failed to run thread %s-test%u\n",
355 chan->dev.bus_id, i); 355 dev_name(&chan->dev), i);
356 kfree(thread); 356 kfree(thread);
357 break; 357 break;
358 } 358 }
@@ -362,7 +362,7 @@ static enum dma_state_client dmatest_add_channel(struct dma_chan *chan)
362 list_add_tail(&thread->node, &dtc->threads); 362 list_add_tail(&thread->node, &dtc->threads);
363 } 363 }
364 364
365 pr_info("dmatest: Started %u threads using %s\n", i, chan->dev.bus_id); 365 pr_info("dmatest: Started %u threads using %s\n", i, dev_name(&chan->dev));
366 366
367 list_add_tail(&dtc->node, &dmatest_channels); 367 list_add_tail(&dtc->node, &dmatest_channels);
368 nr_channels++; 368 nr_channels++;
@@ -379,7 +379,7 @@ static enum dma_state_client dmatest_remove_channel(struct dma_chan *chan)
379 list_del(&dtc->node); 379 list_del(&dtc->node);
380 dmatest_cleanup_channel(dtc); 380 dmatest_cleanup_channel(dtc);
381 pr_debug("dmatest: lost channel %s\n", 381 pr_debug("dmatest: lost channel %s\n",
382 chan->dev.bus_id); 382 dev_name(&chan->dev));
383 return DMA_ACK; 383 return DMA_ACK;
384 } 384 }
385 } 385 }
@@ -418,7 +418,7 @@ dmatest_event(struct dma_client *client, struct dma_chan *chan,
418 418
419 default: 419 default:
420 pr_info("dmatest: Unhandled event %u (%s)\n", 420 pr_info("dmatest: Unhandled event %u (%s)\n",
421 state, chan->dev.bus_id); 421 state, dev_name(&chan->dev));
422 break; 422 break;
423 } 423 }
424 424