diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-27 23:02:37 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-27 23:02:37 -0400 |
commit | 54c0a8a8f5079de866f99d6f0e782c7857511b10 (patch) | |
tree | a097823154e520d85d0965e257036e46b31fac63 | |
parent | 32b88194f71d6ae7768a29f87fbba454728273ee (diff) | |
parent | ab319939a58678c19a68ff10c8a08cef462a3ba6 (diff) |
Merge branch 'cpuidle/4.4' of http://git.linaro.org/people/daniel.lezcano/linux into pm-cpuidle
Pull ARM cpuidle changes for v4.4 from Daniel Lezcano.
* 'cpuidle/4.4' of http://git.linaro.org/people/daniel.lezcano/linux:
cpuidle: mvebu: disable the bind/unbind attributes and use builtin_platform_driver
cpuidle: mvebu: clean up multiple platform drivers
-rw-r--r-- | drivers/cpuidle/cpuidle-mvebu-v7.c | 46 |
1 files changed, 21 insertions, 25 deletions
diff --git a/drivers/cpuidle/cpuidle-mvebu-v7.c b/drivers/cpuidle/cpuidle-mvebu-v7.c index 980151f34707..01a856971f05 100644 --- a/drivers/cpuidle/cpuidle-mvebu-v7.c +++ b/drivers/cpuidle/cpuidle-mvebu-v7.c | |||
@@ -99,44 +99,40 @@ static struct cpuidle_driver armada38x_idle_driver = { | |||
99 | 99 | ||
100 | static int mvebu_v7_cpuidle_probe(struct platform_device *pdev) | 100 | static int mvebu_v7_cpuidle_probe(struct platform_device *pdev) |
101 | { | 101 | { |
102 | mvebu_v7_cpu_suspend = pdev->dev.platform_data; | 102 | const struct platform_device_id *id = pdev->id_entry; |
103 | 103 | ||
104 | if (!strcmp(pdev->dev.driver->name, "cpuidle-armada-xp")) | 104 | if (!id) |
105 | return cpuidle_register(&armadaxp_idle_driver, NULL); | ||
106 | else if (!strcmp(pdev->dev.driver->name, "cpuidle-armada-370")) | ||
107 | return cpuidle_register(&armada370_idle_driver, NULL); | ||
108 | else if (!strcmp(pdev->dev.driver->name, "cpuidle-armada-38x")) | ||
109 | return cpuidle_register(&armada38x_idle_driver, NULL); | ||
110 | else | ||
111 | return -EINVAL; | 105 | return -EINVAL; |
112 | } | ||
113 | 106 | ||
114 | static struct platform_driver armadaxp_cpuidle_plat_driver = { | 107 | mvebu_v7_cpu_suspend = pdev->dev.platform_data; |
115 | .driver = { | ||
116 | .name = "cpuidle-armada-xp", | ||
117 | }, | ||
118 | .probe = mvebu_v7_cpuidle_probe, | ||
119 | }; | ||
120 | 108 | ||
121 | module_platform_driver(armadaxp_cpuidle_plat_driver); | 109 | return cpuidle_register((struct cpuidle_driver *)id->driver_data, NULL); |
110 | } | ||
122 | 111 | ||
123 | static struct platform_driver armada370_cpuidle_plat_driver = { | 112 | static const struct platform_device_id mvebu_cpuidle_ids[] = { |
124 | .driver = { | 113 | { |
114 | .name = "cpuidle-armada-xp", | ||
115 | .driver_data = (unsigned long)&armadaxp_idle_driver, | ||
116 | }, { | ||
125 | .name = "cpuidle-armada-370", | 117 | .name = "cpuidle-armada-370", |
118 | .driver_data = (unsigned long)&armada370_idle_driver, | ||
119 | }, { | ||
120 | .name = "cpuidle-armada-38x", | ||
121 | .driver_data = (unsigned long)&armada38x_idle_driver, | ||
126 | }, | 122 | }, |
127 | .probe = mvebu_v7_cpuidle_probe, | 123 | {} |
128 | }; | 124 | }; |
129 | 125 | ||
130 | module_platform_driver(armada370_cpuidle_plat_driver); | 126 | static struct platform_driver mvebu_cpuidle_driver = { |
131 | 127 | .probe = mvebu_v7_cpuidle_probe, | |
132 | static struct platform_driver armada38x_cpuidle_plat_driver = { | ||
133 | .driver = { | 128 | .driver = { |
134 | .name = "cpuidle-armada-38x", | 129 | .name = "cpuidle-mbevu", |
130 | .suppress_bind_attrs = true, | ||
135 | }, | 131 | }, |
136 | .probe = mvebu_v7_cpuidle_probe, | 132 | .id_table = mvebu_cpuidle_ids, |
137 | }; | 133 | }; |
138 | 134 | ||
139 | module_platform_driver(armada38x_cpuidle_plat_driver); | 135 | builtin_platform_driver(mvebu_cpuidle_driver); |
140 | 136 | ||
141 | MODULE_AUTHOR("Gregory CLEMENT <gregory.clement@free-electrons.com>"); | 137 | MODULE_AUTHOR("Gregory CLEMENT <gregory.clement@free-electrons.com>"); |
142 | MODULE_DESCRIPTION("Marvell EBU v7 cpuidle driver"); | 138 | MODULE_DESCRIPTION("Marvell EBU v7 cpuidle driver"); |