diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2016-02-14 02:33:05 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-02-15 14:55:17 -0800 |
commit | b573b0e65616c1ae5c5dd2c14fd62d3ded3d5466 (patch) | |
tree | c4d419d6972197de81e704cc6e6c72ff77d68ed1 /drivers/staging/greybus/camera.c | |
parent | c161c0fc2f18ab8c299d6cb716d6264427e38867 (diff) | |
download | op-kernel-dev-b573b0e65616c1ae5c5dd2c14fd62d3ded3d5466.zip op-kernel-dev-b573b0e65616c1ae5c5dd2c14fd62d3ded3d5466.tar.gz |
greybus: camera: Clean up when AP link power mode configuration failed
Restore the module link power mode to the previous state in that case.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Gjorgji Rosikopulos <grosikopulos@mm-sol.com>
Tested-by: Jacopo Mondi <jacopo.mondi@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/camera.c')
-rw-r--r-- | drivers/staging/greybus/camera.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index 8383770..25dbf69 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -147,6 +147,7 @@ static int gb_camera_set_power_mode(struct gb_camera *gcam, bool hs) ret = gb_camera_set_intf_power_mode(gcam, svc->ap_intf_id, hs); if (ret < 0) { + gb_camera_set_intf_power_mode(gcam, intf->interface_id, !hs); gcam_err(gcam, "failed to set AP interface to %s (%d)\n", hs ? "HS" : "PWM", ret); return ret; |