summaryrefslogtreecommitdiff
path: root/drivers/dma/dw/pci.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2016-04-27 11:15:40 (GMT)
committerVinod Koul <vinod.koul@intel.com>2016-05-02 10:01:05 (GMT)
commit3a14c66d43d018baed96ceb74f9ab548878c09b8 (patch)
tree76e9ffceb36ecb9b75c8bb591b517da06ecab207 /drivers/dma/dw/pci.c
parent161c3d04aeca8a5bfffe3902786bdf0ccd8575c0 (diff)
downloadlinux-3a14c66d43d018baed96ceb74f9ab548878c09b8.tar.xz
dmaengine: dw: pass platform data via struct dw_dma_chip
We pass struct dw_dma_chip to dw_dma_probe() anyway, thus we may use it to pass a platform data as well. While here, constify the source of the platform data. Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dw/pci.c')
-rw-r--r--drivers/dma/dw/pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/dma/dw/pci.c b/drivers/dma/dw/pci.c
index 358f968..0ae6c3b 100644
--- a/drivers/dma/dw/pci.c
+++ b/drivers/dma/dw/pci.c
@@ -17,8 +17,8 @@
static int dw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid)
{
+ const struct dw_dma_platform_data *pdata = (void *)pid->driver_data;
struct dw_dma_chip *chip;
- struct dw_dma_platform_data *pdata = (void *)pid->driver_data;
int ret;
ret = pcim_enable_device(pdev);
@@ -49,8 +49,9 @@ static int dw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *pid)
chip->dev = &pdev->dev;
chip->regs = pcim_iomap_table(pdev)[0];
chip->irq = pdev->irq;
+ chip->pdata = pdata;
- ret = dw_dma_probe(chip, pdata);
+ ret = dw_dma_probe(chip);
if (ret)
return ret;