Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cac6194f authored by Depeng Shao's avatar Depeng Shao Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Fix parse ois packet issue



Make sure the first three elements of cam_cmd_ois_info
structure same with common_header structure, then ois
driver can parse cmd buf correctlly.

Change-Id: Ic071b65acf4e6fecb6d8317d695b9a8dcb465576
Signed-off-by: default avatarDepeng Shao <depengs@codeaurora.org>
parent e5c3238b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -469,7 +469,7 @@ static int cam_ois_pkt_parse(struct cam_ois_ctrl_t *o_ctrl, void *arg)
				CAM_ERR(CAM_OIS, "invalid cmd buf");
				return -EINVAL;
			}
			cmd_buf += cmd_desc->offset / sizeof(uint32_t);
			cmd_buf += cmd_desc[i].offset / sizeof(uint32_t);
			cmm_hdr = (struct common_header *)cmd_buf;

			switch (cmm_hdr->cmd_type) {
+2 −2
Original line number Diff line number Diff line
@@ -119,20 +119,20 @@ struct cam_ois_opcode {
 *
 * @slave_addr            :    OIS i2c slave address
 * @i2c_freq_mode         :    i2c frequency mode
 * @cmd_type              :    Explains type of command
 * @ois_fw_flag           :    indicates if fw is present or not
 * @is_ois_calib          :    indicates the calibration data is available
 * @ois_name              :    OIS name
 * @opcode                :    opcode
 * @cmd_type              :    Explains type of command
 */
struct cam_cmd_ois_info {
	uint16_t              slave_addr;
	uint8_t               i2c_freq_mode;
	uint8_t               cmd_type;
	uint8_t               ois_fw_flag;
	uint8_t               is_ois_calib;
	char                  ois_name[MAX_OIS_NAME_SIZE];
	struct cam_ois_opcode opcode;
	uint8_t               cmd_type;
} __attribute__((packed));

/**