From: Sergio Aguirre <[EMAIL PROTECTED]>
OMAP: CAM: MT9P012: RESUME Removal
This patch removes the use of the V4L2_POWER_RESUME state, as it has
been rejected in video4linux list
Signed-off-by: Sergio Aguirre <[EMAIL PROTECTED]>
---
drivers/media/video/mt9p012.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
Index: omapkernel/drivers/media/video/mt9p012.c
===================================================================
--- omapkernel.orig/drivers/media/video/mt9p012.c 2008-10-15
20:03:08.000000000 -0500
+++ omapkernel/drivers/media/video/mt9p012.c 2008-10-15 20:04:05.000000000
-0500
@@ -1243,8 +1243,7 @@
struct i2c_client *client = sensor->i2c_client;
u32 coarse_int_time = 0;
- if ((current_power_state == V4L2_POWER_ON) ||
- (current_power_state == V4L2_POWER_RESUME)) {
+ if (current_power_state == V4L2_POWER_ON) {
if ((exp_time < min_exposure_time) ||
(exp_time > max_exposure_time)) {
dev_err(&client->dev, "Exposure time not within the "
@@ -1312,8 +1311,7 @@
struct mt9p012_sensor *sensor = s->priv;
struct i2c_client *client = sensor->i2c_client;
- if ((current_power_state == V4L2_POWER_ON) ||
- (current_power_state == V4L2_POWER_RESUME)) {
+ if (current_power_state == V4L2_POWER_ON) {
if ((gain < MIN_GAIN) || (gain > MAX_GAIN)) {
dev_err(&client->dev, "Gain not within the legal"
" range\n");
@@ -2006,7 +2004,7 @@
mt9p012_write_regs(c, stream_off_list,
I2C_STREAM_OFF_LIST_SIZE);
- if ((on != V4L2_POWER_ON) && (on != V4L2_POWER_RESUME))
+ if (on != V4L2_POWER_ON)
isp_set_xclk(0, MT9P012_USE_XCLKA);
else
isp_set_xclk(xclk_current, MT9P012_USE_XCLKA);
@@ -2019,8 +2017,9 @@
isp_set_xclk(0, MT9P012_USE_XCLKA);
return rval;
}
- current_power_state = on;
- if ((on == V4L2_POWER_RESUME) && (sensor->state == SENSOR_DETECTED))
+ if ((current_power_state == V4L2_POWER_STANDBY) &&
+ (on == V4L2_POWER_ON) &&
+ (sensor->state == SENSOR_DETECTED))
mt9p012_configure(s);
if ((on == V4L2_POWER_ON) && (sensor->state == SENSOR_NOT_DETECTED)) {
@@ -2037,6 +2036,7 @@
sensor->ver);
}
+ current_power_state = on;
return 0;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html