aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/pwc/pwc-dec23.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pwc/pwc-dec23.c')
-rw-r--r--drivers/media/video/pwc/pwc-dec23.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/pwc/pwc-dec23.c b/drivers/media/video/pwc/pwc-dec23.c
index 6d48c1f90683..98772efc5bde 100644
--- a/drivers/media/video/pwc/pwc-dec23.c
+++ b/drivers/media/video/pwc/pwc-dec23.c
@@ -301,6 +301,9 @@ void pwc_dec23_init(struct pwc_device *pdev, unsigned char *cmd)
mutex_init(&pdec->lock);
+ if (pdec->last_cmd_valid && pdec->last_cmd == cmd[2])
+ return;
+
if (DEVICE_USE_CODEC3(pdev->type)) {
flags = cmd[2] & 0x18;
if (flags == 8)
@@ -347,6 +350,9 @@ void pwc_dec23_init(struct pwc_device *pdev, unsigned char *cmd)
for (i=0; i<MAX_OUTER_CROP_VALUE; i++)
pwc_crop_table[MAX_OUTER_CROP_VALUE+256+i] = 255;
#endif
+
+ pdec->last_cmd = cmd[2];
+ pdec->last_cmd_valid = 1;
}
/*