Skip to content

Commit

Permalink
PM / devfreq: tegra: Set drvdata before enabling the irq
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomeu Vizoso authored and MyungJoo Ham committed Mar 31, 2015
1 parent 5d498b4 commit 2da19b1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/devfreq/tegra-devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down

0 comments on commit 2da19b1

Please sign in to comment.