diff options
| author | Guennadi Liakhovetski <g.liakhovetski@gmx.de> | 2012-07-05 06:29:41 -0400 |
|---|---|---|
| committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-07-20 01:53:45 -0400 |
| commit | c2cdb7e4d16394fc51dc5c2c5b3e7c3733bdfaac (patch) | |
| tree | 1e98394a20b33ed09d55b5e37a1c1ed2784721d6 /include/linux | |
| parent | ecf90fbbdc66cde6f5fa25d88541112b9baac459 (diff) | |
dma: sh: use an integer slave ID to improve API compatibility
Initially struct shdma_slave has been introduced with the only member - an
unsigned slave ID - to describe common properties of DMA slaves in an
extensible way. However, experience shows, that a slave ID is indeed the
only parameter, needed to identify DMA slaves. This is also, what is used
by the core dmaengine API in struct dma_slave_config. We switch to using
the slave_id directly, instead of passing a pointer to struct shdma_slave
to improve compatibility with the core. We also make the slave_id signed
for easier error checking.
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sh_dma.h | 8 | ||||
| -rw-r--r-- | include/linux/shdma-base.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h index a79f10a32243..4e83f3e034f3 100644 --- a/include/linux/sh_dma.h +++ b/include/linux/sh_dma.h | |||
| @@ -27,10 +27,10 @@ struct sh_dmae_slave { | |||
| 27 | * a certain peripheral | 27 | * a certain peripheral |
| 28 | */ | 28 | */ |
| 29 | struct sh_dmae_slave_config { | 29 | struct sh_dmae_slave_config { |
| 30 | unsigned int slave_id; | 30 | int slave_id; |
| 31 | dma_addr_t addr; | 31 | dma_addr_t addr; |
| 32 | u32 chcr; | 32 | u32 chcr; |
| 33 | char mid_rid; | 33 | char mid_rid; |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| 36 | struct sh_dmae_channel { | 36 | struct sh_dmae_channel { |
diff --git a/include/linux/shdma-base.h b/include/linux/shdma-base.h index c3a19e9c20c4..6263ad2e7426 100644 --- a/include/linux/shdma-base.h +++ b/include/linux/shdma-base.h | |||
| @@ -43,7 +43,7 @@ struct device; | |||
| 43 | */ | 43 | */ |
| 44 | 44 | ||
| 45 | struct shdma_slave { | 45 | struct shdma_slave { |
| 46 | unsigned int slave_id; | 46 | int slave_id; |
| 47 | }; | 47 | }; |
| 48 | 48 | ||
| 49 | struct shdma_desc { | 49 | struct shdma_desc { |
| @@ -66,7 +66,7 @@ struct shdma_chan { | |||
| 66 | size_t max_xfer_len; /* max transfer length */ | 66 | size_t max_xfer_len; /* max transfer length */ |
| 67 | int id; /* Raw id of this channel */ | 67 | int id; /* Raw id of this channel */ |
| 68 | int irq; /* Channel IRQ */ | 68 | int irq; /* Channel IRQ */ |
| 69 | struct shdma_slave *slave; /* Client data for slave DMA */ | 69 | int slave_id; /* Client ID for slave DMA */ |
| 70 | enum shdma_pm_state pm_state; | 70 | enum shdma_pm_state pm_state; |
| 71 | }; | 71 | }; |
| 72 | 72 | ||
| @@ -93,8 +93,8 @@ struct shdma_ops { | |||
| 93 | dma_addr_t (*slave_addr)(struct shdma_chan *); | 93 | dma_addr_t (*slave_addr)(struct shdma_chan *); |
| 94 | int (*desc_setup)(struct shdma_chan *, struct shdma_desc *, | 94 | int (*desc_setup)(struct shdma_chan *, struct shdma_desc *, |
| 95 | dma_addr_t, dma_addr_t, size_t *); | 95 | dma_addr_t, dma_addr_t, size_t *); |
| 96 | int (*set_slave)(struct shdma_chan *, struct shdma_slave *); | 96 | int (*set_slave)(struct shdma_chan *, int); |
| 97 | void (*setup_xfer)(struct shdma_chan *, struct shdma_slave *); | 97 | void (*setup_xfer)(struct shdma_chan *, int); |
| 98 | void (*start_xfer)(struct shdma_chan *, struct shdma_desc *); | 98 | void (*start_xfer)(struct shdma_chan *, struct shdma_desc *); |
| 99 | struct shdma_desc *(*embedded_desc)(void *, int); | 99 | struct shdma_desc *(*embedded_desc)(void *, int); |
| 100 | bool (*chan_irq)(struct shdma_chan *, int); | 100 | bool (*chan_irq)(struct shdma_chan *, int); |
