diff options
author | Tony Lindgren <tony@atomide.com> | 2010-09-23 20:29:28 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-09-23 20:29:28 -0400 |
commit | 172c11351576cf5daa8f1b02a265bf84de8bbed1 (patch) | |
tree | 5bd75dc35bfced691abdef92bde861ca246b4321 /arch/arm/plat-omap/omap_device.c | |
parent | 9af2ebbd09e01bd2711617dcafce5f608cace6ec (diff) | |
parent | 0aed043517ad4135cb458a46e9e99e21cbb59c69 (diff) |
Merge branch 'pm-next' of ssh://master.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm into omap-for-linus
Diffstat (limited to 'arch/arm/plat-omap/omap_device.c')
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index ceba58a47595..b5e5f6074b0b 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -91,12 +91,6 @@ | |||
91 | #define USE_WAKEUP_LAT 0 | 91 | #define USE_WAKEUP_LAT 0 |
92 | #define IGNORE_WAKEUP_LAT 1 | 92 | #define IGNORE_WAKEUP_LAT 1 |
93 | 93 | ||
94 | /* | ||
95 | * OMAP_DEVICE_MAGIC: used to determine whether a struct omap_device | ||
96 | * obtained via container_of() is in fact a struct omap_device | ||
97 | */ | ||
98 | #define OMAP_DEVICE_MAGIC 0xf00dcafe | ||
99 | |||
100 | /* Private functions */ | 94 | /* Private functions */ |
101 | 95 | ||
102 | /** | 96 | /** |
@@ -453,8 +447,6 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, | |||
453 | od->pm_lats = pm_lats; | 447 | od->pm_lats = pm_lats; |
454 | od->pm_lats_cnt = pm_lats_cnt; | 448 | od->pm_lats_cnt = pm_lats_cnt; |
455 | 449 | ||
456 | od->magic = OMAP_DEVICE_MAGIC; | ||
457 | |||
458 | if (is_early_device) | 450 | if (is_early_device) |
459 | ret = omap_early_device_register(od); | 451 | ret = omap_early_device_register(od); |
460 | else | 452 | else |
@@ -514,6 +506,7 @@ int omap_device_register(struct omap_device *od) | |||
514 | { | 506 | { |
515 | pr_debug("omap_device: %s: registering\n", od->pdev.name); | 507 | pr_debug("omap_device: %s: registering\n", od->pdev.name); |
516 | 508 | ||
509 | od->pdev.dev.parent = &omap_device_parent; | ||
517 | return platform_device_register(&od->pdev); | 510 | return platform_device_register(&od->pdev); |
518 | } | 511 | } |
519 | 512 | ||
@@ -668,18 +661,6 @@ int omap_device_align_pm_lat(struct platform_device *pdev, | |||
668 | } | 661 | } |
669 | 662 | ||
670 | /** | 663 | /** |
671 | * omap_device_is_valid - Check if pointer is a valid omap_device | ||
672 | * @od: struct omap_device * | ||
673 | * | ||
674 | * Return whether struct omap_device pointer @od points to a valid | ||
675 | * omap_device. | ||
676 | */ | ||
677 | bool omap_device_is_valid(struct omap_device *od) | ||
678 | { | ||
679 | return (od && od->magic == OMAP_DEVICE_MAGIC); | ||
680 | } | ||
681 | |||
682 | /** | ||
683 | * omap_device_get_pwrdm - return the powerdomain * associated with @od | 664 | * omap_device_get_pwrdm - return the powerdomain * associated with @od |
684 | * @od: struct omap_device * | 665 | * @od: struct omap_device * |
685 | * | 666 | * |
@@ -798,3 +779,14 @@ int omap_device_enable_clocks(struct omap_device *od) | |||
798 | /* XXX pass along return value here? */ | 779 | /* XXX pass along return value here? */ |
799 | return 0; | 780 | return 0; |
800 | } | 781 | } |
782 | |||
783 | struct device omap_device_parent = { | ||
784 | .init_name = "omap", | ||
785 | .parent = &platform_bus, | ||
786 | }; | ||
787 | |||
788 | static int __init omap_device_init(void) | ||
789 | { | ||
790 | return device_register(&omap_device_parent); | ||
791 | } | ||
792 | core_initcall(omap_device_init); | ||