Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <jacopo.mondi@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@linaro.org>
Signed-off-by: Alex Elder <elder@linaro.org>

authored by

Jacopo Mondi and committed by
Alex Elder
80b3982b 36ab1108

+2 -1
+2 -1
drivers/staging/greybus/camera.c
··· 468 468 memset(req, 0, sizeof(*req)); 469 469 gb_operation_sync(gcam->connection, 470 470 GB_CAMERA_TYPE_CONFIGURE_STREAMS, 471 - req, req_size, resp, resp_size); 471 + req, sizeof(*req), 472 + resp, sizeof(*resp)); 472 473 *flags = 0; 473 474 *num_streams = 0; 474 475 goto done;