Hello.

On 15-04-2014 1:35, Ben Dooks wrote:

Add support for R8A7790 with new device tree code.

Signed-off-by: Ben Dooks <[email protected]>
---
  drivers/dma/sh/shdmac.c | 32 +++++++++++++++++++++++++-------
  1 file changed, 25 insertions(+), 7 deletions(-)

diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c
index 0d765c0..eb57cf2 100644
--- a/drivers/dma/sh/shdmac.c
+++ b/drivers/dma/sh/shdmac.c
@@ -342,11 +342,21 @@ static const struct sh_dmae_slave_config *dmae_find_slave(
                        if (cfg->slave_id == match)
                                return cfg;
        } else {
-               for (i = 0, cfg = pdata->slave; i < pdata->slave_num; i++, 
cfg++)
-                       if (cfg->mid_rid == match) {
+               if (!pdata->slave) {
+                       cfg = shdma_find_slave_of(shdev, match, &i);
+                       if (cfg) {
                                sh_chan->shdma_chan.slave_id = i;
                                return cfg;
                        }
+
+                       return NULL;
+               } else

   All arms of the *if* statement should have {} if at least one arm has {}.

+                       for (i = 0, cfg = pdata->slave; i < pdata->slave_num;
+                            i++, cfg++)
+                               if (cfg->mid_rid == match) {
+                                       sh_chan->shdma_chan.slave_id = i;
+                                       return cfg;
+                               }
        }

        return NULL;

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to