aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/devfreq
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-14 03:56:43 -0500
committerMyungJoo Ham <myungjoo.ham@samsung.com>2012-01-19 20:12:37 -0500
commitf0c28b0075cad861f4b93c526c6446169d136466 (patch)
tree555ff5fd80187e77e0a8e1befc19c98675231ac3 /drivers/devfreq
parentdcd6c92267155e70a94b3927bce681ce74b80d1f (diff)
devfreq: exynos4_bus: Use dev_get_drvdata at appropriate places
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq')
-rw-r--r--drivers/devfreq/exynos4_bus.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/devfreq/exynos4_bus.c b/drivers/devfreq/exynos4_bus.c
index 6460577d6701..489ccfa93a96 100644
--- a/drivers/devfreq/exynos4_bus.c
+++ b/drivers/devfreq/exynos4_bus.c
@@ -622,9 +622,7 @@ static int exynos4_bus_setvolt(struct busfreq_data *data, struct opp *opp,
622static int exynos4_bus_target(struct device *dev, unsigned long *_freq) 622static int exynos4_bus_target(struct device *dev, unsigned long *_freq)
623{ 623{
624 int err = 0; 624 int err = 0;
625 struct platform_device *pdev = container_of(dev, struct platform_device, 625 struct busfreq_data *data = dev_get_drvdata(dev);
626 dev);
627 struct busfreq_data *data = platform_get_drvdata(pdev);
628 struct opp *opp = devfreq_recommended_opp(dev, _freq); 626 struct opp *opp = devfreq_recommended_opp(dev, _freq);
629 unsigned long old_freq = opp_get_freq(data->curr_opp); 627 unsigned long old_freq = opp_get_freq(data->curr_opp);
630 unsigned long freq = opp_get_freq(opp); 628 unsigned long freq = opp_get_freq(opp);
@@ -689,9 +687,7 @@ static int exynos4_get_busier_dmc(struct busfreq_data *data)
689static int exynos4_bus_get_dev_status(struct device *dev, 687static int exynos4_bus_get_dev_status(struct device *dev,
690 struct devfreq_dev_status *stat) 688 struct devfreq_dev_status *stat)
691{ 689{
692 struct platform_device *pdev = container_of(dev, struct platform_device, 690 struct busfreq_data *data = dev_get_drvdata(dev);
693 dev);
694 struct busfreq_data *data = platform_get_drvdata(pdev);
695 int busier_dmc; 691 int busier_dmc;
696 int cycles_x2 = 2; /* 2 x cycles */ 692 int cycles_x2 = 2; /* 2 x cycles */
697 void __iomem *addr; 693 void __iomem *addr;
@@ -739,9 +735,7 @@ static int exynos4_bus_get_dev_status(struct device *dev,
739 735
740static void exynos4_bus_exit(struct device *dev) 736static void exynos4_bus_exit(struct device *dev)
741{ 737{
742 struct platform_device *pdev = container_of(dev, struct platform_device, 738 struct busfreq_data *data = dev_get_drvdata(dev);
743 dev);
744 struct busfreq_data *data = platform_get_drvdata(pdev);
745 739
746 devfreq_unregister_opp_notifier(dev, data->devfreq); 740 devfreq_unregister_opp_notifier(dev, data->devfreq);
747} 741}
@@ -1087,9 +1081,7 @@ static __devexit int exynos4_busfreq_remove(struct platform_device *pdev)
1087 1081
1088static int exynos4_busfreq_resume(struct device *dev) 1082static int exynos4_busfreq_resume(struct device *dev)
1089{ 1083{
1090 struct platform_device *pdev = container_of(dev, struct platform_device, 1084 struct busfreq_data *data = dev_get_drvdata(dev);
1091 dev);
1092 struct busfreq_data *data = platform_get_drvdata(pdev);
1093 1085
1094 busfreq_mon_reset(data); 1086 busfreq_mon_reset(data);
1095 return 0; 1087 return 0;