From: Jacopo Mondi Date: Thu, 30 Jun 2016 14:18:00 +0000 (-0500) Subject: greybus: camera: Fix size of configure_streams(0) X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=80b3982b8d1ca463963b9d2d406098c18add2baf;p=linux-beck.git greybus: camera: Fix size of configure_streams(0) When APB-A CSI-Tx configuration fails, it is necessary to unconfigure the camera module issuesing a 0 stream configuration request. Fix size of request and response to avoid Greybus core complain about Response size differences. Testing Done: Triggering the error condition after APB-A CSI-tx configuration does not make Greybus core complain anymore Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Signed-off-by: Alex Elder --- diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index 41891b24ef05..ce0ff759f3ce 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -468,7 +468,8 @@ static int gb_camera_configure_streams(struct gb_camera *gcam, memset(req, 0, sizeof(*req)); gb_operation_sync(gcam->connection, GB_CAMERA_TYPE_CONFIGURE_STREAMS, - req, req_size, resp, resp_size); + req, sizeof(*req), + resp, sizeof(*resp)); *flags = 0; *num_streams = 0; goto done;