dmaengine: idxd: add a device to represent the file opened
authorDave Jiang <dave.jiang@intel.com>
Fri, 7 Apr 2023 20:31:40 +0000 (13:31 -0700)
committerVinod Koul <vkoul@kernel.org>
Wed, 12 Apr 2023 17:48:45 +0000 (23:18 +0530)
commite6fd6d7e5f0fe4a17a08e892afb5db800e7794ec
treeb0ec0c7ce03e680e029680b06fdb7292ae933e28
parentfecae134ee10b7de69461c197450f7c05677e733
dmaengine: idxd: add a device to represent the file opened

Embed a struct device for the user file context in order to export sysfs
attributes related with the opened file. Tie the lifetime of the file
context to the device. The sysfs entry will be added under the char device.

Tested-by: Tony Zhu <tony.zhu@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Co-developed-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/20230407203143.2189681-14-fenghua.yu@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/cdev.c
drivers/dma/idxd/idxd.h