diff options
author | Dan Williams <dan.j.williams@intel.com> | 2009-01-06 13:38:21 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2009-01-06 13:38:21 -0500 |
commit | 864498aaa9fef69ee166da023d12413a7776342d (patch) | |
tree | 023d6bfc15ba192c1a92caab3ff7525a84e409fc /include/linux/dmaengine.h | |
parent | 41d5e59c1299f27983977bcfe3b360600996051c (diff) |
dmaengine: use idr for registering dma device numbers
This brings some predictability to dma device numbers, i.e. an rmmod/insmod
cycle may now result in /sys/class/dma/dma0chan0 being restored rather than
/sys/class/dma/dma1chan0 appearing.
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index d6b6bff355f4..64dea2ab326c 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -140,10 +140,14 @@ struct dma_chan { | |||
140 | * struct dma_chan_dev - relate sysfs device node to backing channel device | 140 | * struct dma_chan_dev - relate sysfs device node to backing channel device |
141 | * @chan - driver channel device | 141 | * @chan - driver channel device |
142 | * @device - sysfs device | 142 | * @device - sysfs device |
143 | * @dev_id - parent dma_device dev_id | ||
144 | * @idr_ref - reference count to gate release of dma_device dev_id | ||
143 | */ | 145 | */ |
144 | struct dma_chan_dev { | 146 | struct dma_chan_dev { |
145 | struct dma_chan *chan; | 147 | struct dma_chan *chan; |
146 | struct device device; | 148 | struct device device; |
149 | int dev_id; | ||
150 | atomic_t *idr_ref; | ||
147 | }; | 151 | }; |
148 | 152 | ||
149 | static inline const char *dma_chan_name(struct dma_chan *chan) | 153 | static inline const char *dma_chan_name(struct dma_chan *chan) |