From d4615ab308d14a12bfd9a49014491005370009da Mon Sep 17 00:00:00 2001 From: ddl Date: Fri, 28 Jun 2013 11:16:15 +0800 Subject: [PATCH] camera: generic_sensor v0.1.9 --- drivers/media/video/generic_sensor.c | 6 ++++-- drivers/media/video/generic_sensor.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/media/video/generic_sensor.c b/drivers/media/video/generic_sensor.c index ec12fb506cb3..00e26c6f6ac6 100755 --- a/drivers/media/video/generic_sensor.c +++ b/drivers/media/video/generic_sensor.c @@ -22,9 +22,11 @@ * add support flash control; * *v0.1.5/v0.1.7: -* fix use v4l2_mbus_framefmt.reserved array overflow in generic_sensor_s_fmt; +* fix use v4l2_mbus_framefmt.reserved array overflow in generic_sensor_s_fmt; +*v0.1.9: +* fix sensor_find_ctrl may be overflow; */ -static int version = KERNEL_VERSION(0,1,7); +static int version = KERNEL_VERSION(0,1,9); module_param(version, int, S_IRUGO); diff --git a/drivers/media/video/generic_sensor.h b/drivers/media/video/generic_sensor.h index 5ea8e46a5365..8b77a356e473 100755 --- a/drivers/media/video/generic_sensor.h +++ b/drivers/media/video/generic_sensor.h @@ -421,7 +421,7 @@ static inline struct sensor_v4l2ctrl_info_s* sensor_find_ctrl( { int i; - for (i = 0; i < ops[i].num_ctrls; i++) + for (i = 0; i < ops[0].num_ctrls; i++) if (ops[i].qctrl->id == id) return &ops[i]; -- 2.34.1