rcar-hpbdma: add parameter to set_slave() method

Commit 4981c4dc194efb18f0e9a02f1b43e926f2f0d2bb (DMA: shdma: switch DT mode to
use configuration data from a match table) added a new parameter to set_slave()
method but unfortunately got merged later than commit c4f6c41ba790bbbfcebb4c47a
(dma: add driver for R-Car HPB-DMAC), so that the HPB-DMAC driver retained the
old prototype which caused this warning:

drivers/dma/sh/rcar-hpbdma.c:485: warning: initialization from incompatible
pointer type

The newly added parameter is used to override DMA slave address from 'struct
hpb_dmae_slave_config', so we have to add the 'slave_addr' field to 'struct
hpb_dmae_chan', conditionally assign it in set_slave() method, and return in
slave_addr() method.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Tested-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

authored by Sergei Shtylyov and committed by Vinod Koul 08d08bcd cdeb5c03

+5 -2
+5 -2
drivers/dma/sh/rcar-hpbdma.c
··· 93 void __iomem *base; 94 const struct hpb_dmae_slave_config *cfg; 95 char dev_id[16]; /* unique name per DMAC of channel */ 96 }; 97 98 struct hpb_dmae_device { ··· 446 return 0; 447 } 448 449 - static int hpb_dmae_set_slave(struct shdma_chan *schan, int slave_id, bool try) 450 { 451 struct hpb_dmae_chan *chan = to_chan(schan); 452 const struct hpb_dmae_slave_config *sc = ··· 458 if (try) 459 return 0; 460 chan->cfg = sc; 461 return hpb_dmae_alloc_chan_resources(chan, sc); 462 } 463 ··· 470 { 471 struct hpb_dmae_chan *chan = to_chan(schan); 472 473 - return chan->cfg->addr; 474 } 475 476 static struct shdma_desc *hpb_dmae_embedded_desc(void *buf, int i)
··· 93 void __iomem *base; 94 const struct hpb_dmae_slave_config *cfg; 95 char dev_id[16]; /* unique name per DMAC of channel */ 96 + dma_addr_t slave_addr; 97 }; 98 99 struct hpb_dmae_device { ··· 445 return 0; 446 } 447 448 + static int hpb_dmae_set_slave(struct shdma_chan *schan, int slave_id, 449 + dma_addr_t slave_addr, bool try) 450 { 451 struct hpb_dmae_chan *chan = to_chan(schan); 452 const struct hpb_dmae_slave_config *sc = ··· 456 if (try) 457 return 0; 458 chan->cfg = sc; 459 + chan->slave_addr = slave_addr ? : sc->addr; 460 return hpb_dmae_alloc_chan_resources(chan, sc); 461 } 462 ··· 467 { 468 struct hpb_dmae_chan *chan = to_chan(schan); 469 470 + return chan->slave_addr; 471 } 472 473 static struct shdma_desc *hpb_dmae_embedded_desc(void *buf, int i)