diff options
Diffstat (limited to 'arch/arm/plat-omap/omap_device.c')
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 2526fa312b8a..3471c650743b 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -236,11 +236,6 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat) | |||
236 | return 0; | 236 | return 0; |
237 | } | 237 | } |
238 | 238 | ||
239 | static inline struct omap_device *_find_by_pdev(struct platform_device *pdev) | ||
240 | { | ||
241 | return container_of(pdev, struct omap_device, pdev); | ||
242 | } | ||
243 | |||
244 | /** | 239 | /** |
245 | * _add_optional_clock_clkdev - Add clkdev entry for hwmod optional clocks | 240 | * _add_optional_clock_clkdev - Add clkdev entry for hwmod optional clocks |
246 | * @od: struct omap_device *od | 241 | * @od: struct omap_device *od |
@@ -316,7 +311,7 @@ u32 omap_device_get_context_loss_count(struct platform_device *pdev) | |||
316 | struct omap_device *od; | 311 | struct omap_device *od; |
317 | u32 ret = 0; | 312 | u32 ret = 0; |
318 | 313 | ||
319 | od = _find_by_pdev(pdev); | 314 | od = to_omap_device(pdev); |
320 | 315 | ||
321 | if (od->hwmods_cnt) | 316 | if (od->hwmods_cnt) |
322 | ret = omap_hwmod_get_context_loss_count(od->hwmods[0]); | 317 | ret = omap_hwmod_get_context_loss_count(od->hwmods[0]); |
@@ -654,7 +649,7 @@ int omap_device_enable(struct platform_device *pdev) | |||
654 | int ret; | 649 | int ret; |
655 | struct omap_device *od; | 650 | struct omap_device *od; |
656 | 651 | ||
657 | od = _find_by_pdev(pdev); | 652 | od = to_omap_device(pdev); |
658 | 653 | ||
659 | if (od->_state == OMAP_DEVICE_STATE_ENABLED) { | 654 | if (od->_state == OMAP_DEVICE_STATE_ENABLED) { |
660 | WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", | 655 | WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", |
@@ -693,7 +688,7 @@ int omap_device_idle(struct platform_device *pdev) | |||
693 | int ret; | 688 | int ret; |
694 | struct omap_device *od; | 689 | struct omap_device *od; |
695 | 690 | ||
696 | od = _find_by_pdev(pdev); | 691 | od = to_omap_device(pdev); |
697 | 692 | ||
698 | if (od->_state != OMAP_DEVICE_STATE_ENABLED) { | 693 | if (od->_state != OMAP_DEVICE_STATE_ENABLED) { |
699 | WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", | 694 | WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", |
@@ -724,7 +719,7 @@ int omap_device_shutdown(struct platform_device *pdev) | |||
724 | int ret, i; | 719 | int ret, i; |
725 | struct omap_device *od; | 720 | struct omap_device *od; |
726 | 721 | ||
727 | od = _find_by_pdev(pdev); | 722 | od = to_omap_device(pdev); |
728 | 723 | ||
729 | if (od->_state != OMAP_DEVICE_STATE_ENABLED && | 724 | if (od->_state != OMAP_DEVICE_STATE_ENABLED && |
730 | od->_state != OMAP_DEVICE_STATE_IDLE) { | 725 | od->_state != OMAP_DEVICE_STATE_IDLE) { |
@@ -765,7 +760,7 @@ int omap_device_align_pm_lat(struct platform_device *pdev, | |||
765 | int ret = -EINVAL; | 760 | int ret = -EINVAL; |
766 | struct omap_device *od; | 761 | struct omap_device *od; |
767 | 762 | ||
768 | od = _find_by_pdev(pdev); | 763 | od = to_omap_device(pdev); |
769 | 764 | ||
770 | if (new_wakeup_lat_limit == od->dev_wakeup_lat) | 765 | if (new_wakeup_lat_limit == od->dev_wakeup_lat) |
771 | return 0; | 766 | return 0; |