diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2014-02-17 05:27:49 -0500 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2014-04-16 06:03:04 -0400 |
commit | dc2eadece70089430f12e4ed6bb1a4421cf3d6f4 (patch) | |
tree | 5c2a10f5710bcd1446f85cc56430adb911159ff9 /drivers/clocksource/sh_cmt.c | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
clocksource: sh_cmt: Use request_irq() instead of setup_irq()
The driver claims it needs to register an interrupt handler too early
for request_irq(). This might have been true in the past, but the only
meaningful difference between request_irq() and setup_irq() today is an
additional kzalloc() call in request_irq(). As the driver calls
kmalloc() itself we know that the slab allocator is available, we can
thus switch to request_irq().
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/clocksource/sh_cmt.c')
-rw-r--r-- | drivers/clocksource/sh_cmt.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 0b1836a6c539..a3103b871260 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c | |||
@@ -728,12 +728,6 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev) | |||
728 | goto err1; | 728 | goto err1; |
729 | } | 729 | } |
730 | 730 | ||
731 | /* request irq using setup_irq() (too early for request_irq()) */ | ||
732 | p->irqaction.name = dev_name(&p->pdev->dev); | ||
733 | p->irqaction.handler = sh_cmt_interrupt; | ||
734 | p->irqaction.dev_id = p; | ||
735 | p->irqaction.flags = IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING; | ||
736 | |||
737 | /* get hold of clock */ | 731 | /* get hold of clock */ |
738 | p->clk = clk_get(&p->pdev->dev, "cmt_fck"); | 732 | p->clk = clk_get(&p->pdev->dev, "cmt_fck"); |
739 | if (IS_ERR(p->clk)) { | 733 | if (IS_ERR(p->clk)) { |
@@ -786,7 +780,9 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev) | |||
786 | } | 780 | } |
787 | p->cs_enabled = false; | 781 | p->cs_enabled = false; |
788 | 782 | ||
789 | ret = setup_irq(irq, &p->irqaction); | 783 | ret = request_irq(irq, sh_cmt_interrupt, |
784 | IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING, | ||
785 | dev_name(&p->pdev->dev), p); | ||
790 | if (ret) { | 786 | if (ret) { |
791 | dev_err(&p->pdev->dev, "failed to request irq %d\n", irq); | 787 | dev_err(&p->pdev->dev, "failed to request irq %d\n", irq); |
792 | goto err4; | 788 | goto err4; |