Skip to content

Commit fea459b

Browse files
pelwellpopcornmix
authored andcommitted
bcm2708-dmaengine: Use platform_get_irq
The platform driver framework no longer creates IRQ resources for platform devices because they are expected to use platform_get_irq. This causes the bcm2808_fb acceleration to fail. Fix the problem by calling platform_get_irq as intended. See: #5131 Signed-off-by: Phil Elwell <[email protected]>
1 parent 610628b commit fea459b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/dma/bcm2708-dmaengine.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ extern int bcm_dma_chan_alloc(unsigned required_feature_set,
199199
{
200200
struct vc_dmaman *dmaman = g_dmaman;
201201
struct platform_device *pdev = to_platform_device(dmaman_dev);
202-
struct resource *r;
203202
int chan;
203+
int irq;
204204

205205
if (!dmaman_dev)
206206
return -ENODEV;
@@ -210,8 +210,8 @@ extern int bcm_dma_chan_alloc(unsigned required_feature_set,
210210
if (chan < 0)
211211
goto out;
212212

213-
r = platform_get_resource(pdev, IORESOURCE_IRQ, (unsigned int)chan);
214-
if (!r) {
213+
irq = platform_get_irq(pdev, (unsigned int)chan);
214+
if (irq < 0) {
215215
dev_err(dmaman_dev, "failed to get irq for DMA channel %d\n",
216216
chan);
217217
vc_dmaman_chan_free(dmaman, chan);
@@ -220,7 +220,7 @@ extern int bcm_dma_chan_alloc(unsigned required_feature_set,
220220
}
221221

222222
*out_dma_base = BCM2708_DMA_CHANIO(dmaman->dma_base, chan);
223-
*out_dma_irq = r->start;
223+
*out_dma_irq = irq;
224224
dev_dbg(dmaman_dev,
225225
"Legacy API allocated channel=%d, base=%p, irq=%i\n",
226226
chan, *out_dma_base, *out_dma_irq);

0 commit comments

Comments
 (0)