aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-09-27 13:18:00 -0400
committerTony Lindgren <tony@atomide.com>2010-09-27 13:18:00 -0400
commitd58cc92bda765e62f28b12a8f4627ddee32978f0 (patch)
tree3609fc3ae4a17106e83e18d9fb6fe54c08170316 /arch/arm/plat-omap
parentb245f26f5e45a6513a318835d83eea895d3ab54b (diff)
parent78f26e872f77b6312273216de1a8f836c6f2e143 (diff)
Merge branch 'misc_2.6.37' of git://git.pwsan.com/linux-2.6 into omap-for-linus
Diffstat (limited to 'arch/arm/plat-omap')
-rw-r--r--arch/arm/plat-omap/omap_device.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index b5e5f6074b0..abe933cd8f0 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -290,12 +290,11 @@ static void _add_optional_clock_alias(struct omap_device *od,
290 */ 290 */
291int omap_device_count_resources(struct omap_device *od) 291int omap_device_count_resources(struct omap_device *od)
292{ 292{
293 struct omap_hwmod *oh;
294 int c = 0; 293 int c = 0;
295 int i; 294 int i;
296 295
297 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) 296 for (i = 0; i < od->hwmods_cnt; i++)
298 c += omap_hwmod_count_resources(oh); 297 c += omap_hwmod_count_resources(od->hwmods[i]);
299 298
300 pr_debug("omap_device: %s: counted %d total resources across %d " 299 pr_debug("omap_device: %s: counted %d total resources across %d "
301 "hwmods\n", od->pdev.name, c, od->hwmods_cnt); 300 "hwmods\n", od->pdev.name, c, od->hwmods_cnt);
@@ -322,12 +321,11 @@ int omap_device_count_resources(struct omap_device *od)
322 */ 321 */
323int omap_device_fill_resources(struct omap_device *od, struct resource *res) 322int omap_device_fill_resources(struct omap_device *od, struct resource *res)
324{ 323{
325 struct omap_hwmod *oh;
326 int c = 0; 324 int c = 0;
327 int i, r; 325 int i, r;
328 326
329 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) { 327 for (i = 0; i < od->hwmods_cnt; i++) {
330 r = omap_hwmod_fill_resources(oh, res); 328 r = omap_hwmod_fill_resources(od->hwmods[i], res);
331 res += r; 329 res += r;
332 c += r; 330 c += r;
333 } 331 }
@@ -600,7 +598,6 @@ int omap_device_shutdown(struct platform_device *pdev)
600{ 598{
601 int ret, i; 599 int ret, i;
602 struct omap_device *od; 600 struct omap_device *od;
603 struct omap_hwmod *oh;
604 601
605 od = _find_by_pdev(pdev); 602 od = _find_by_pdev(pdev);
606 603
@@ -613,8 +610,8 @@ int omap_device_shutdown(struct platform_device *pdev)
613 610
614 ret = _omap_device_deactivate(od, IGNORE_WAKEUP_LAT); 611 ret = _omap_device_deactivate(od, IGNORE_WAKEUP_LAT);
615 612
616 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) 613 for (i = 0; i < od->hwmods_cnt; i++)
617 omap_hwmod_shutdown(oh); 614 omap_hwmod_shutdown(od->hwmods[i]);
618 615
619 od->_state = OMAP_DEVICE_STATE_SHUTDOWN; 616 od->_state = OMAP_DEVICE_STATE_SHUTDOWN;
620 617
@@ -714,11 +711,10 @@ void __iomem *omap_device_get_rt_va(struct omap_device *od)
714 */ 711 */
715int omap_device_enable_hwmods(struct omap_device *od) 712int omap_device_enable_hwmods(struct omap_device *od)
716{ 713{
717 struct omap_hwmod *oh;
718 int i; 714 int i;
719 715
720 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) 716 for (i = 0; i < od->hwmods_cnt; i++)
721 omap_hwmod_enable(oh); 717 omap_hwmod_enable(od->hwmods[i]);
722 718
723 /* XXX pass along return value here? */ 719 /* XXX pass along return value here? */
724 return 0; 720 return 0;
@@ -732,11 +728,10 @@ int omap_device_enable_hwmods(struct omap_device *od)
732 */ 728 */
733int omap_device_idle_hwmods(struct omap_device *od) 729int omap_device_idle_hwmods(struct omap_device *od)
734{ 730{
735 struct omap_hwmod *oh;
736 int i; 731 int i;
737 732
738 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) 733 for (i = 0; i < od->hwmods_cnt; i++)
739 omap_hwmod_idle(oh); 734 omap_hwmod_idle(od->hwmods[i]);
740 735
741 /* XXX pass along return value here? */ 736 /* XXX pass along return value here? */
742 return 0; 737 return 0;
@@ -751,11 +746,10 @@ int omap_device_idle_hwmods(struct omap_device *od)
751 */ 746 */
752int omap_device_disable_clocks(struct omap_device *od) 747int omap_device_disable_clocks(struct omap_device *od)
753{ 748{
754 struct omap_hwmod *oh;
755 int i; 749 int i;
756 750
757 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) 751 for (i = 0; i < od->hwmods_cnt; i++)
758 omap_hwmod_disable_clocks(oh); 752 omap_hwmod_disable_clocks(od->hwmods[i]);
759 753
760 /* XXX pass along return value here? */ 754 /* XXX pass along return value here? */
761 return 0; 755 return 0;
@@ -770,11 +764,10 @@ int omap_device_disable_clocks(struct omap_device *od)
770 */ 764 */
771int omap_device_enable_clocks(struct omap_device *od) 765int omap_device_enable_clocks(struct omap_device *od)
772{ 766{
773 struct omap_hwmod *oh;
774 int i; 767 int i;
775 768
776 for (i = 0, oh = *od->hwmods; i < od->hwmods_cnt; i++, oh++) 769 for (i = 0; i < od->hwmods_cnt; i++)
777 omap_hwmod_enable_clocks(oh); 770 omap_hwmod_enable_clocks(od->hwmods[i]);
778 771
779 /* XXX pass along return value here? */ 772 /* XXX pass along return value here? */
780 return 0; 773 return 0;