summaryrefslogtreecommitdiffstats
path: root/drivers/dma/qcom/hidma.h
diff options
context:
space:
mode:
authorSinan Kaya <okaya@codeaurora.org>2016-11-14 14:34:53 -0500
committerVinod Koul <vinod.koul@intel.com>2016-11-15 08:58:12 +0530
commitc6e4584dab244752ffc1d7f95cdcf5290e7f1369 (patch)
treeeadee5f1e4de414dd2c563a102d80152d6ab596f /drivers/dma/qcom/hidma.h
parent8cc12b26b403611175c4f1aec13abc4e383897fb (diff)
downloadlinux-c6e4584dab244752ffc1d7f95cdcf5290e7f1369.tar.bz2
dmaengine: qcom_hidma: cleanup sysfs entries during remove
The 4.8-rc8 kernel is printing duplicate file entry warnings while removing the HIDMA object. This is caused by stale sysfs entries remaining from the previous execution. _sysfs_warn_dup+0x5c/0x78 sysfs_add_file_mode_ns+0x13c/0x1c0 sysfs_create_file_ns+0x2c/0x40 device_create_file+0x54/0xa0 hidma_probe+0x7c8/0x808 Create hidma_sysfs_init and hidma_sysfs_uninit functions and call them from the probe and remove path. To do proper clean up, adding the attrs object to the device data structure to keep it around until remove call is made. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/qcom/hidma.h')
-rw-r--r--drivers/dma/qcom/hidma.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/qcom/hidma.h b/drivers/dma/qcom/hidma.h
index 05f8ba49e6c6..c7d014235c32 100644
--- a/drivers/dma/qcom/hidma.h
+++ b/drivers/dma/qcom/hidma.h
@@ -130,6 +130,9 @@ struct hidma_dev {
struct dentry *debugfs;
struct dentry *stats;
+ /* sysfs entry for the channel id */
+ struct device_attribute *chid_attrs;
+
/* Task delivering issue_pending */
struct tasklet_struct task;
};