aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-03-19 00:46:38 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-03-23 04:19:30 -0400
commit4bab9d426e6dbd9ea09330919a33d35d5faab400 (patch)
treecb78032733f4a45e8b36719b70854cc567b56b55 /drivers/dma
parentae6be51ed01d6c4aaf249a207b4434bc7785853b (diff)
dmaengine: shdma: Remove sh_dmae_slave_chan_id enum
This patch replaces the sh_dmae_slave_chan_id enum with an unsigned int. The purpose of this chainge is to make it possible to separate the slave id enums from the dmaengine header. The slave id enums varies with processor model, so in the future it makes sense to put these in the processor specific headers together with the pinmux enums. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/shdma.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c
index 5d17e09cb625..e5588f4868ca 100644
--- a/drivers/dma/shdma.c
+++ b/drivers/dma/shdma.c
@@ -266,7 +266,7 @@ static struct sh_desc *sh_dmae_get_desc(struct sh_dmae_chan *sh_chan)
266} 266}
267 267
268static struct sh_dmae_slave_config *sh_dmae_find_slave( 268static struct sh_dmae_slave_config *sh_dmae_find_slave(
269 struct sh_dmae_chan *sh_chan, enum sh_dmae_slave_chan_id slave_id) 269 struct sh_dmae_chan *sh_chan, struct sh_dmae_slave *param)
270{ 270{
271 struct dma_device *dma_dev = sh_chan->common.device; 271 struct dma_device *dma_dev = sh_chan->common.device;
272 struct sh_dmae_device *shdev = container_of(dma_dev, 272 struct sh_dmae_device *shdev = container_of(dma_dev,
@@ -274,11 +274,11 @@ static struct sh_dmae_slave_config *sh_dmae_find_slave(
274 struct sh_dmae_pdata *pdata = shdev->pdata; 274 struct sh_dmae_pdata *pdata = shdev->pdata;
275 int i; 275 int i;
276 276
277 if ((unsigned)slave_id >= SHDMA_SLAVE_NUMBER) 277 if (param->slave_id >= SHDMA_SLAVE_NUMBER)
278 return NULL; 278 return NULL;
279 279
280 for (i = 0; i < pdata->slave_num; i++) 280 for (i = 0; i < pdata->slave_num; i++)
281 if (pdata->slave[i].slave_id == slave_id) 281 if (pdata->slave[i].slave_id == param->slave_id)
282 return pdata->slave + i; 282 return pdata->slave + i;
283 283
284 return NULL; 284 return NULL;
@@ -299,7 +299,7 @@ static int sh_dmae_alloc_chan_resources(struct dma_chan *chan)
299 if (param) { 299 if (param) {
300 struct sh_dmae_slave_config *cfg; 300 struct sh_dmae_slave_config *cfg;
301 301
302 cfg = sh_dmae_find_slave(sh_chan, param->slave_id); 302 cfg = sh_dmae_find_slave(sh_chan, param);
303 if (!cfg) 303 if (!cfg)
304 return -EINVAL; 304 return -EINVAL;
305 305