@@ -849,7 +849,7 @@ static int dw_edma_irq_request(struct dw_edma *dw,
if (chip->nr_irqs == 1) {
/* Common IRQ shared among all channels */
- irq = chip->ops->irq_vector(dev, 0);
+ irq = chip->ops->irq_vector(chip, 0);
err = request_irq(irq, dw_edma_interrupt_common,
IRQF_SHARED, dw->name, &dw->irq[0]);
if (err) {
@@ -874,7 +874,7 @@ static int dw_edma_irq_request(struct dw_edma *dw,
dw_edma_add_irq_mask(&rd_mask, *rd_alloc, dw->rd_ch_cnt);
for (i = 0; i < (*wr_alloc + *rd_alloc); i++) {
- irq = chip->ops->irq_vector(dev, i);
+ irq = chip->ops->irq_vector(chip, i);
err = request_irq(irq,
i < *wr_alloc ?
dw_edma_interrupt_write :
@@ -895,7 +895,7 @@ static int dw_edma_irq_request(struct dw_edma *dw,
err_irq_free:
for (i--; i >= 0; i--) {
- irq = chip->ops->irq_vector(dev, i);
+ irq = chip->ops->irq_vector(chip, i);
free_irq(irq, &dw->irq[i]);
}
@@ -975,7 +975,7 @@ int dw_edma_probe(struct dw_edma_chip *chip)
err_irq_free:
for (i = (dw->nr_irqs - 1); i >= 0; i--)
- free_irq(chip->ops->irq_vector(dev, i), &dw->irq[i]);
+ free_irq(chip->ops->irq_vector(chip, i), &dw->irq[i]);
return err;
}
@@ -984,7 +984,6 @@ EXPORT_SYMBOL_GPL(dw_edma_probe);
int dw_edma_remove(struct dw_edma_chip *chip)
{
struct dw_edma_chan *chan, *_chan;
- struct device *dev = chip->dev;
struct dw_edma *dw = chip->dw;
int i;
@@ -997,7 +996,7 @@ int dw_edma_remove(struct dw_edma_chip *chip)
/* Free irqs */
for (i = (dw->nr_irqs - 1); i >= 0; i--)
- free_irq(chip->ops->irq_vector(dev, i), &dw->irq[i]);
+ free_irq(chip->ops->irq_vector(chip, i), &dw->irq[i]);
/* Deregister eDMA device */
dma_async_device_unregister(&dw->dma);
@@ -90,9 +90,9 @@ static const struct dw_edma_pcie_data snps_edda_data = {
.rd_ch_cnt = 2,
};
-static int dw_edma_pcie_irq_vector(struct device *dev, unsigned int nr)
+static int dw_edma_pcie_irq_vector(struct dw_edma_chip *chip, unsigned int nr)
{
- return pci_irq_vector(to_pci_dev(dev), nr);
+ return pci_irq_vector(to_pci_dev(chip->dev), nr);
}
static u64 dw_edma_pcie_address(struct device *dev, phys_addr_t cpu_addr)
@@ -858,9 +858,9 @@ static u32 dw_pcie_readl_dma(struct dw_pcie *pci, u32 reg)
return val;
}
-static int dw_pcie_edma_irq_vector(struct device *dev, unsigned int nr)
+static int dw_pcie_edma_irq_vector(struct dw_edma_chip *edma, unsigned int nr)
{
- struct platform_device *pdev = to_platform_device(dev);
+ struct platform_device *pdev = to_platform_device(edma->dev);
char name[6];
int ret;
@@ -16,6 +16,7 @@
#define EDMA_MAX_RD_CH 8
struct dw_edma;
+struct dw_edma_chip;
struct dw_edma_region {
u64 paddr;
@@ -41,7 +42,7 @@ struct dw_edma_region {
* automatically.
*/
struct dw_edma_plat_ops {
- int (*irq_vector)(struct device *dev, unsigned int nr);
+ int (*irq_vector)(struct dw_edma_chip *chip, unsigned int nr);
u64 (*pci_address)(struct device *dev, phys_addr_t cpu_addr);
};