diff options
author | Tomeu Vizoso <tomeu.vizoso@collabora.com> | 2015-03-17 05:36:16 -0400 |
---|---|---|
committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2015-03-31 00:17:14 -0400 |
commit | 2da19b1a4d4fadf8d84a5cb6a953749a559a29fb (patch) | |
tree | e5744282403e7ce56bcbe79a847988f29aad7897 /drivers/devfreq | |
parent | 5d498b463a3cdef51e6d4cc7066ac89c360e7a98 (diff) |
PM / devfreq: tegra: Set drvdata before enabling the irq
To avoid a race in which the interrupt will be handled before the
drvdata has been set up.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r-- | drivers/devfreq/tegra-devfreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/devfreq/tegra-devfreq.c b/drivers/devfreq/tegra-devfreq.c index 5ba35cc2ea04..7fa1bd4c431b 100644 --- a/drivers/devfreq/tegra-devfreq.c +++ b/drivers/devfreq/tegra-devfreq.c | |||
@@ -697,6 +697,8 @@ static int tegra_devfreq_probe(struct platform_device *pdev) | |||
697 | return -ENODEV; | 697 | return -ENODEV; |
698 | } | 698 | } |
699 | 699 | ||
700 | platform_set_drvdata(pdev, tegra); | ||
701 | |||
700 | err = devm_request_threaded_irq(&pdev->dev, irq, actmon_isr, | 702 | err = devm_request_threaded_irq(&pdev->dev, irq, actmon_isr, |
701 | actmon_thread_isr, IRQF_SHARED, | 703 | actmon_thread_isr, IRQF_SHARED, |
702 | "tegra-devfreq", tegra); | 704 | "tegra-devfreq", tegra); |
@@ -705,8 +707,6 @@ static int tegra_devfreq_probe(struct platform_device *pdev) | |||
705 | return err; | 707 | return err; |
706 | } | 708 | } |
707 | 709 | ||
708 | platform_set_drvdata(pdev, tegra); | ||
709 | |||
710 | tegra_devfreq_profile.initial_freq = clk_get_rate(tegra->emc_clock); | 710 | tegra_devfreq_profile.initial_freq = clk_get_rate(tegra->emc_clock); |
711 | tegra->devfreq = devm_devfreq_add_device(&pdev->dev, | 711 | tegra->devfreq = devm_devfreq_add_device(&pdev->dev, |
712 | &tegra_devfreq_profile, | 712 | &tegra_devfreq_profile, |