From: Tomeu Vizoso Date: Tue, 17 Mar 2015 09:36:16 +0000 (+0100) Subject: PM / devfreq: tegra: Set drvdata before enabling the irq X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2da19b1a4d4fadf8d84a5cb6a953749a559a29fb;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Acked-by: MyungJoo Ham --- 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) return -ENODEV; } + platform_set_drvdata(pdev, tegra); + err = devm_request_threaded_irq(&pdev->dev, irq, actmon_isr, actmon_thread_isr, IRQF_SHARED, "tegra-devfreq", tegra); @@ -705,8 +707,6 @@ static int tegra_devfreq_probe(struct platform_device *pdev) return err; } - platform_set_drvdata(pdev, tegra); - tegra_devfreq_profile.initial_freq = clk_get_rate(tegra->emc_clock); tegra->devfreq = devm_devfreq_add_device(&pdev->dev, &tegra_devfreq_profile,