diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/soc_camera.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/media/video/soc_camera.c b/drivers/media/video/soc_camera.c index b6be5ee678b6..66ebe5956a87 100644 --- a/drivers/media/video/soc_camera.c +++ b/drivers/media/video/soc_camera.c | |||
@@ -732,10 +732,36 @@ static int soc_camera_remove(struct device *dev) | |||
732 | return 0; | 732 | return 0; |
733 | } | 733 | } |
734 | 734 | ||
735 | static int soc_camera_suspend(struct device *dev, pm_message_t state) | ||
736 | { | ||
737 | struct soc_camera_device *icd = to_soc_camera_dev(dev); | ||
738 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | ||
739 | int ret = 0; | ||
740 | |||
741 | if (ici->ops->suspend) | ||
742 | ret = ici->ops->suspend(icd, state); | ||
743 | |||
744 | return ret; | ||
745 | } | ||
746 | |||
747 | static int soc_camera_resume(struct device *dev) | ||
748 | { | ||
749 | struct soc_camera_device *icd = to_soc_camera_dev(dev); | ||
750 | struct soc_camera_host *ici = to_soc_camera_host(icd->dev.parent); | ||
751 | int ret = 0; | ||
752 | |||
753 | if (ici->ops->resume) | ||
754 | ret = ici->ops->resume(icd); | ||
755 | |||
756 | return ret; | ||
757 | } | ||
758 | |||
735 | static struct bus_type soc_camera_bus_type = { | 759 | static struct bus_type soc_camera_bus_type = { |
736 | .name = "soc-camera", | 760 | .name = "soc-camera", |
737 | .probe = soc_camera_probe, | 761 | .probe = soc_camera_probe, |
738 | .remove = soc_camera_remove, | 762 | .remove = soc_camera_remove, |
763 | .suspend = soc_camera_suspend, | ||
764 | .resume = soc_camera_resume, | ||
739 | }; | 765 | }; |
740 | 766 | ||
741 | static struct device_driver ic_drv = { | 767 | static struct device_driver ic_drv = { |