summaryrefslogtreecommitdiff
path: root/drivers/dma/idxd/dma.c
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2021-07-15 21:43:20 +0300
committerVinod Koul <vkoul@kernel.org>2021-07-21 07:39:15 +0300
commit700af3a0a26cbac87e4a0ae1dfa79597d0056d5f (patch)
tree2b20292106cb58592b1d8fc1d615e2b752e3f501 /drivers/dma/idxd/dma.c
parentda5a11d75d6837c9c5ef40810f66ce9d2db6ca5e (diff)
downloadlinux-700af3a0a26cbac87e4a0ae1dfa79597d0056d5f.tar.xz
dmaengine: idxd: add 'struct idxd_dev' as wrapper for conf_dev
Add a 'struct idxd_dev' that wraps the 'struct device' for idxd conf_dev that registers with the dsa bus. This is introduced in order to deal with multiple different types of 'devices' that are registered on the dsa_bus when the compat driver needs to route them to the correct driver to attach. The bind() call now can determine the type of device and then do the appropriate driver matching. Reviewed-by Dan Williams <dan.j.williams@intel.com> Signed-off-by: Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/162637460065.744545.584492831446090984.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/idxd/dma.c')
-rw-r--r--drivers/dma/idxd/dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/idxd/dma.c b/drivers/dma/idxd/dma.c
index 77439b645044..2e52f9a50519 100644
--- a/drivers/dma/idxd/dma.c
+++ b/drivers/dma/idxd/dma.c
@@ -245,7 +245,7 @@ int idxd_register_dma_channel(struct idxd_wq *wq)
wq->idxd_chan = idxd_chan;
idxd_chan->wq = wq;
- get_device(&wq->conf_dev);
+ get_device(wq_confdev(wq));
return 0;
}
@@ -260,5 +260,5 @@ void idxd_unregister_dma_channel(struct idxd_wq *wq)
list_del(&chan->device_node);
kfree(wq->idxd_chan);
wq->idxd_chan = NULL;
- put_device(&wq->conf_dev);
+ put_device(wq_confdev(wq));
}