diff options
Diffstat (limited to 'drivers/dma/dmaengine.c')
-rw-r--r-- | drivers/dma/dmaengine.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index dc003a3a787d..657996517374 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -388,7 +388,10 @@ int dma_async_device_register(struct dma_device *device) | |||
388 | 388 | ||
389 | init_completion(&device->done); | 389 | init_completion(&device->done); |
390 | kref_init(&device->refcount); | 390 | kref_init(&device->refcount); |
391 | |||
392 | mutex_lock(&dma_list_mutex); | ||
391 | device->dev_id = id++; | 393 | device->dev_id = id++; |
394 | mutex_unlock(&dma_list_mutex); | ||
392 | 395 | ||
393 | /* represent channels in sysfs. Probably want devs too */ | 396 | /* represent channels in sysfs. Probably want devs too */ |
394 | list_for_each_entry(chan, &device->channels, device_node) { | 397 | list_for_each_entry(chan, &device->channels, device_node) { |
@@ -399,8 +402,8 @@ int dma_async_device_register(struct dma_device *device) | |||
399 | chan->chan_id = chancnt++; | 402 | chan->chan_id = chancnt++; |
400 | chan->dev.class = &dma_devclass; | 403 | chan->dev.class = &dma_devclass; |
401 | chan->dev.parent = device->dev; | 404 | chan->dev.parent = device->dev; |
402 | snprintf(chan->dev.bus_id, BUS_ID_SIZE, "dma%dchan%d", | 405 | dev_set_name(&chan->dev, "dma%dchan%d", |
403 | device->dev_id, chan->chan_id); | 406 | device->dev_id, chan->chan_id); |
404 | 407 | ||
405 | rc = device_register(&chan->dev); | 408 | rc = device_register(&chan->dev); |
406 | if (rc) { | 409 | if (rc) { |