Skip to content

Commit

Permalink
clocksource: sh_tmu: Fix channel IRQ retrieval in legacy case
Browse files Browse the repository at this point in the history
In the legacy platform data case each TMU platform device handles a
single channel with a single IRQ for the platform device. Retrieve the
IRQ using the logical channel number instead of the hardware channel
number.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
  • Loading branch information
Laurent Pinchart authored and Daniel Lezcano committed May 19, 2014
1 parent 346f5e7 commit c54697a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clocksource/sh_tmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, unsigned int index,
ch->base = tmu->mapbase + 8 + ch->index * 12;
}

ch->irq = platform_get_irq(tmu->pdev, ch->index);
ch->irq = platform_get_irq(tmu->pdev, index);
if (ch->irq < 0) {
dev_err(&tmu->pdev->dev, "ch%u: failed to get irq\n",
ch->index);
Expand Down

0 comments on commit c54697a

Please sign in to comment.