media: omap3isp: support 64-bit version of omap3isp_stat_data
C libraries with 64-bit time_t use an incompatible format for struct omap3isp_stat_data. This changes the kernel code to support either version, by moving over the normal handling to the 64-bit variant, and adding compatiblity code to handle the old binary format with the existing ioctl command code. Fortunately, the command code includes the size of the structure, so the difference gets handled automatically. In the process of eliminating the references to 'struct timeval' from the kernel, I also change the way the timestamp is generated internally, basically by open-coding the v4l2_get_timestamp() call. [Sakari Ailus: Alphabetical order of headers, clean up compat code] Cc: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
daa36370b6
commit
378e3f81cb
@@ -39,7 +39,7 @@ struct ispstat_buffer {
|
||||
struct sg_table sgt;
|
||||
void *virt_addr;
|
||||
dma_addr_t dma_addr;
|
||||
struct timeval ts;
|
||||
struct timespec64 ts;
|
||||
u32 buf_size;
|
||||
u32 frame_number;
|
||||
u16 config_counter;
|
||||
@@ -130,6 +130,8 @@ struct ispstat_generic_config {
|
||||
int omap3isp_stat_config(struct ispstat *stat, void *new_conf);
|
||||
int omap3isp_stat_request_statistics(struct ispstat *stat,
|
||||
struct omap3isp_stat_data *data);
|
||||
int omap3isp_stat_request_statistics_time32(struct ispstat *stat,
|
||||
struct omap3isp_stat_data_time32 *data);
|
||||
int omap3isp_stat_init(struct ispstat *stat, const char *name,
|
||||
const struct v4l2_subdev_ops *sd_ops);
|
||||
void omap3isp_stat_cleanup(struct ispstat *stat);
|
||||
|
Reference in New Issue
Block a user