aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/devices.c
diff options
context:
space:
mode:
authorBenoit Cousson <b-cousson@ti.com>2011-08-10 09:30:09 -0400
committerKevin Hilman <khilman@ti.com>2011-10-04 12:52:23 -0400
commitf718e2c034bf6ff872106344935006230764cb12 (patch)
tree3653ea104c56ca98ab60ff89bb160e181cc5855c /arch/arm/mach-omap2/devices.c
parentb7b5bc91d422ff51ff84dfd5949e9d2f17a550c8 (diff)
ARM: OMAP2+: devices: Remove all omap_device_pm_latency structures
Remove all these duplicated structures since a default one is now available. Signed-off-by: Benoit Cousson <b-cousson@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r--arch/arm/mach-omap2/devices.c46
1 files changed, 4 insertions, 42 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index 10adf66be7ba..2d4a1998d5d9 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -221,14 +221,6 @@ static inline void omap_init_camera(void)
221#endif 221#endif
222} 222}
223 223
224struct omap_device_pm_latency omap_keyboard_latency[] = {
225 {
226 .deactivate_func = omap_device_idle_hwmods,
227 .activate_func = omap_device_enable_hwmods,
228 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
229 },
230};
231
232int __init omap4_keyboard_init(struct omap4_keypad_platform_data 224int __init omap4_keyboard_init(struct omap4_keypad_platform_data
233 *sdp4430_keypad_data, struct omap_board_data *bdata) 225 *sdp4430_keypad_data, struct omap_board_data *bdata)
234{ 226{
@@ -248,9 +240,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
248 keypad_data = sdp4430_keypad_data; 240 keypad_data = sdp4430_keypad_data;
249 241
250 pdev = omap_device_build(name, id, oh, keypad_data, 242 pdev = omap_device_build(name, id, oh, keypad_data,
251 sizeof(struct omap4_keypad_platform_data), 243 sizeof(struct omap4_keypad_platform_data), NULL, 0, 0);
252 omap_keyboard_latency,
253 ARRAY_SIZE(omap_keyboard_latency), 0);
254 244
255 if (IS_ERR(pdev)) { 245 if (IS_ERR(pdev)) {
256 WARN(1, "Can't build omap_device for %s:%s.\n", 246 WARN(1, "Can't build omap_device for %s:%s.\n",
@@ -263,14 +253,6 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
263} 253}
264 254
265#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE) 255#if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
266static struct omap_device_pm_latency mbox_latencies[] = {
267 [0] = {
268 .activate_func = omap_device_enable_hwmods,
269 .deactivate_func = omap_device_idle_hwmods,
270 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
271 },
272};
273
274static inline void omap_init_mbox(void) 256static inline void omap_init_mbox(void)
275{ 257{
276 struct omap_hwmod *oh; 258 struct omap_hwmod *oh;
@@ -282,8 +264,7 @@ static inline void omap_init_mbox(void)
282 return; 264 return;
283 } 265 }
284 266
285 pdev = omap_device_build("omap-mailbox", -1, oh, NULL, 0, 267 pdev = omap_device_build("omap-mailbox", -1, oh, NULL, 0, NULL, 0, 0);
286 mbox_latencies, ARRAY_SIZE(mbox_latencies), 0);
287 WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n", 268 WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n",
288 __func__, PTR_ERR(pdev)); 269 __func__, PTR_ERR(pdev));
289} 270}
@@ -334,14 +315,6 @@ static inline void omap_init_audio(void) {}
334 315
335#include <plat/mcspi.h> 316#include <plat/mcspi.h>
336 317
337struct omap_device_pm_latency omap_mcspi_latency[] = {
338 [0] = {
339 .deactivate_func = omap_device_idle_hwmods,
340 .activate_func = omap_device_enable_hwmods,
341 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
342 },
343};
344
345static int omap_mcspi_init(struct omap_hwmod *oh, void *unused) 318static int omap_mcspi_init(struct omap_hwmod *oh, void *unused)
346{ 319{
347 struct platform_device *pdev; 320 struct platform_device *pdev;
@@ -372,8 +345,7 @@ static int omap_mcspi_init(struct omap_hwmod *oh, void *unused)
372 345
373 spi_num++; 346 spi_num++;
374 pdev = omap_device_build(name, spi_num, oh, pdata, 347 pdev = omap_device_build(name, spi_num, oh, pdata,
375 sizeof(*pdata), omap_mcspi_latency, 348 sizeof(*pdata), NULL, 0, 0);
376 ARRAY_SIZE(omap_mcspi_latency), 0);
377 WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s\n", 349 WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s\n",
378 name, oh->name); 350 name, oh->name);
379 kfree(pdata); 351 kfree(pdata);
@@ -698,14 +670,6 @@ static int __init omap2_init_devices(void)
698arch_initcall(omap2_init_devices); 670arch_initcall(omap2_init_devices);
699 671
700#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) 672#if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE)
701static struct omap_device_pm_latency omap_wdt_latency[] = {
702 [0] = {
703 .deactivate_func = omap_device_idle_hwmods,
704 .activate_func = omap_device_enable_hwmods,
705 .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
706 },
707};
708
709static int __init omap_init_wdt(void) 673static int __init omap_init_wdt(void)
710{ 674{
711 int id = -1; 675 int id = -1;
@@ -723,9 +687,7 @@ static int __init omap_init_wdt(void)
723 return -EINVAL; 687 return -EINVAL;
724 } 688 }
725 689
726 pdev = omap_device_build(dev_name, id, oh, NULL, 0, 690 pdev = omap_device_build(dev_name, id, oh, NULL, 0, NULL, 0, 0);
727 omap_wdt_latency,
728 ARRAY_SIZE(omap_wdt_latency), 0);
729 WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n", 691 WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n",
730 dev_name, oh->name); 692 dev_name, oh->name);
731 return 0; 693 return 0;