From 3a89c9ddab15e31cd9afe06825f15c5ffea38076 Mon Sep 17 00:00:00 2001 From: Rebecca Schultz Zavin Date: Thu, 23 Sep 2010 22:07:59 -0700 Subject: [PATCH] media: video: tegra: ov5650: Clean up headers to match latest userspace Change-Id: I57cbdb7aec24a1dd8942e8fa341a735fdacf08e5 Signed-off-by: Rebecca Schultz Zavin --- drivers/media/video/tegra/ov5650.c | 3 ++- include/media/ov5650.h | 16 ++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/media/video/tegra/ov5650.c b/drivers/media/video/tegra/ov5650.c index 3c6f372b97cc..bc57956a49bf 100755 --- a/drivers/media/video/tegra/ov5650.c +++ b/drivers/media/video/tegra/ov5650.c @@ -592,7 +592,8 @@ static int ov5650_get_otp(struct ov5650_info *info, void __user *ubuffer) } /* Serial number is BE. */ - info->otp_data.serial_num = __be32_to_cpu(info->otp_data.serial_num); + info->otp_data.module_serial_num = + __be32_to_cpu(info->otp_data.module_serial_num); /* Read the CRC and compared to computed. */ i = offsetof(struct ov5650_otp_data, crc); diff --git a/include/media/ov5650.h b/include/media/ov5650.h index f52c2e556666..083cf6e21eae 100755 --- a/include/media/ov5650.h +++ b/include/media/ov5650.h @@ -36,7 +36,8 @@ enum ov5650_test_pattern { }; struct ov5650_otp_data { - __u8 reserved1[6]; + /* Only the first 5 bytes are actually used. */ + __u8 sensor_serial_num[6]; __u8 part_num[8]; __u8 lens_id[1]; __u8 manufacture_id[2]; @@ -44,11 +45,14 @@ struct ov5650_otp_data { __u8 manufacture_date[9]; __u8 manufacture_line[2]; - __u32 serial_num; - __u8 focuser_cal[16]; + __u32 module_serial_num; + __u8 focuser_liftoff[2]; + __u8 focuser_macro[2]; + __u8 reserved1[12]; __u8 shutter_cal[16]; __u8 reserved2[183]; + /* Big-endian. CRC16 over 0x00-0x41 (inclusive) */ __u16 crc; __u8 reserved3[3]; __u8 auto_load[2]; @@ -57,9 +61,9 @@ struct ov5650_otp_data { struct ov5650_mode { int xres; int yres; - u32 frame_length; - u32 coarse_time; - u16 gain; + __u32 frame_length; + __u32 coarse_time; + __u16 gain; }; #ifdef __KERNEL__ struct ov5650_platform_data { -- 2.34.1